创建mysql 表语法:
CREATE TABLE offices
(
officecode INT(10) NOT NULL UNIQUE,
city VARCHAR(50)NOT NULL,
address VARCHAR (50)
country VARCHAR (50) NOT NULL,
postalcode VARCHAR (15)
PRIMARY KEY (officecode)
);
报错:
1 queries executed, 0 success, 1 errors, 0 warnings
查询:create table offices ( officecode int(10) not null unique, city varchar(50)not null, address varchar (50) country varchar (50) n...
错误代码: 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 'country varchar (50) not null,
postalcode varchar (15)
primary key (officecode' at line 6
诸位大神什么原因了
address VARCHAR (50)后面少逗号啊,postalcode VARCHAR (15)后面也少
果然如你所说添加上就好了, 鄙人刚学习mysql,谢谢 大兄弟
你这是不细心啊
第一次学,看的教程学的,说嘛哪里有问题。 谢谢大哥
@孟江湖: 楼上不是说了,少了逗号吗
@路庭花:确实少了逗号