MySQL错误1064表创建

MySQL错误1064表创建,mysql,syntax-error,mysql-error-1064,Mysql,Syntax Error,Mysql Error 1064,这似乎是一个相当小的问题,但我在运行以下查询时运气不佳: create table if not exists tweet_data ( created_at DATETIME, user_name VARCHAR(20), retweet_count INT, favourite_count INT, tweet_followers_count INT, is_retweet BOOLEAN, tweet_source VARCHAR(256), user_location VARCHAR(2

这似乎是一个相当小的问题,但我在运行以下查询时运气不佳:

create table if not exists tweet_data (
created_at DATETIME,
user_name VARCHAR(20),
retweet_count INT,
favourite_count INT,
tweet_followers_count INT,
is_retweet BOOLEAN,
tweet_source VARCHAR(256),
user_location VARCHAR(256),
tweet_mentioned_count INT,
tweet_ID VARCHAR(256) NOT NULL,
tweet_text VARCHAR(140),
UNIQUE (tweet_ID) );
运行此操作时,我会收到以下错误消息:

Error Code: 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 '(20),  retweet_count INT,     favourite_count INT,     
tweet_followers_count ' at line 3
当我将鼠标悬停在第3行的错误标记上时,它会显示:

Syntax error : unexpected '(' (opening parenthesis)
我相信这是一个简单的修复,任何帮助都将是伟大的

create table if not exists  tweet_data (

created_at DATETIME,

user_name VARCHAR (20),

retweet_count INT,

favourite_count INT,

tweet_followers_count INT,

is_retweet BOOLEAN,

tweet_source VARCHAR(256),

user_location VARCHAR(256),

tweet_mentioned_count INT,

tweet_ID VARCHAR(256) NOT NULL,

tweet_text VARCHAR(140),

UNIQUE (tweet_ID) );
这个代码运行得很好

转到此链接并自行检查


mySQL Workbench的结果是一个错误

应该是user\u name VARCHAR20,R之间没有空格,是不是因为20中有空格,user\u name列中有VARCHAR?尝试了这个,但不幸的是仍然得到相同的错误。将进行编辑以删除上面的空间。