下面的SQL语法哪里错了?怎样改正?create table catch_dedecms(id int auto_increment primary key,litpic varchar,litpic_path varchar,title varchar,area varchar,language varchar,year int,director varchar,actor varchar);报错:ERROR 1064 (4200
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/17 19:32:48
下面的SQL语法哪里错了?怎样改正?create table catch_dedecms(id int auto_increment primary key,litpic varchar,litpic_path varchar,title varchar,area varchar,language varchar,year int,director varchar,actor varchar);报错:ERROR 1064 (4200
下面的SQL语法哪里错了?怎样改正?
create table catch_dedecms
(id int auto_increment primary key,
litpic varchar,
litpic_path varchar,
title varchar,
area varchar,
language varchar,
year int,
director varchar,
actor varchar);
报错:
ERROR 1064 (42000):You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the r
ight syntax to use near '
litpic_path varchar,
title varchar,
area varchar,
language varchar,
y' at line 3
下面的SQL语法哪里错了?怎样改正?create table catch_dedecms(id int auto_increment primary key,litpic varchar,litpic_path varchar,title varchar,area varchar,language varchar,year int,director varchar,actor varchar);报错:ERROR 1064 (4200
您的varchar没有设定最大长度.varchar是可变的,所以必须要设定长度.
create table catch_dedecms
(id int auto_increment primary key,
litpic varchar(200),
litpic_path varchar(200),
title varchar(200),
area varchar(200),
language varchar(200),
year int,
director varchar(200),
actor varchar(200));