我是靠谱客的博主 悦耳歌曲,这篇文章主要介绍mysql新建表unsigned_创建数据表添加unsigned时需要注意的,现在分享给大家,希望可以做个参考。

创建mysql数据表 错误语句:create table blog_article(id int(11) not null UNSIGNED

primary key auto_increment,typeid varchar(250),title

varchar(250), content text not null,author

varchar(250),leavetime int(11));

错误提示 mysql的提示还真够让你折腾的mysql> create table blog_comment(id int(11) not null UNSIGNED primary key auto_increment,article_id int(11) UNSIGNED,username varchar(250),

time int(11) UNSIGNED,pid int(11));

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right synta

x to use near 'UNSIGNED primary key auto_increment,article_id int(11) UNSIGNED,username varchar' at line 1

这里的错误是由于unsigned 的位置放错造成的,unsigned应该放在数据类型的第一位,不然会提示错误

正确语句:create table blog_article(id int(11) UNSIGNED not null

primary key auto_increment,typeid varchar(250),title

varchar(250), content text not null,author

varchar(250),leavetime int(11));

最后

以上就是悦耳歌曲最近收集整理的关于mysql新建表unsigned_创建数据表添加unsigned时需要注意的的全部内容,更多相关mysql新建表unsigned_创建数据表添加unsigned时需要注意内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(81)

评论列表共有 0 条评论

立即
投稿
返回
顶部