编写一条sql语句在MySQL中创建表
CREATE TABLE fb_web_user_feeds(id bigint not null primary key auto_increment,host_id bigint,,author varchar(64),time varchar(64),user_feed text)
但有错误:
pymysql.err.ProgrammingError: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'author varchar(64),time varchar(64),user_feed text)' at line 1")
请告诉我原因
最佳答案
这是因为你这里有两个逗号:
host_id bigint,,author varchar(64)
它应该只是 1 个逗号,使您的语法为:
CREATE TABLE fb_web_user_feeds(id bigint not null primary key auto_increment,host_id bigint,author varchar(64),time varchar(64),user_feed text)
关于mysql - sql建表错误MySQL服务器版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43432904/