· (ZZ)Mysql ERROR 1005 (HY000): Can't create table 'xxx' (errno: 150)
2009-4-2 13:51:44 阅读503 评论0 22009/04 Apr2
在使用MySQL的时候,在操作不当时,很容易出现 ERROR 1005 (HY000): Can't create table 这类错误。很多站长朋友可能需要排查很久才会找到问题的原因其实很简单,希望这篇文章可以对站长朋友以及Mysql初学者一点帮助。
MySQL官方提供的问题原因:
在信息中有一组【LATEST FOREIGN KEY ERROR】会有最近错误的详细描述和解决办法。
Cannot find an index in the referenced table where the referenced columns appear as the first columns, or column types in the table and the referenced table do not match for constraint.
2009-4-1 23:19:12 阅读29 评论0 12009/04 Apr1
2008-12-6 21:04:19 阅读41 评论1 62008/12 Dec6
2008-12-2 13:56:18 阅读563 评论0 22008/12 Dec2
日期时间转字符串
Select CONVERT(varchar(100), GETDATE(), 0): 05 16 2006 10:57AM
Select CONVERT(varchar(100), GETDATE(), 1): 05/16/06
Select CONVERT(varchar(100), GETDATE(), 2): 06.05.16
Select CONVERT(varchar(100), GETDATE(), 3): 16/05/06
Select CONVERT(varchar(100), GETDATE(), 4): 16.05.06
Select CONVERT(varchar(100), GETDATE(), 5): 16-05-06
Select CONVERT(varchar(100), GETDATE(), 6): 16 05 06