create table tb_topic(
id int(4) auto_increment primary key not null,
content text,
author varchar(20) not null,
submittime timestamp(8) default current_timestamp,
forumid int(4) default 0,
title varchar(300) not null,
xq varchar(30) not null,
rq int(4) default 0,
forumname varchar(20)
);submittime timestamp(8) default current_timestamp,
这一句怎么老是报错??
id int(4) auto_increment primary key not null,
content text,
author varchar(20) not null,
submittime timestamp(8) default current_timestamp,
forumid int(4) default 0,
title varchar(300) not null,
xq varchar(30) not null,
rq int(4) default 0,
forumname varchar(20)
);submittime timestamp(8) default current_timestamp,
这一句怎么老是报错??
-> id int(4) auto_increment primary key not null,
-> content text,
-> author varchar(20) not null,
-> submittime timestamp default current_timestamp,
-> forumid int(4) default 0,
-> title varchar(300) not null,
-> xq varchar(30) not null,
-> rq int(4) default 0,
-> forumname varchar(20)
-> );
Query OK, 0 rows affected (0.20 sec)mysql>
mysql> create table tb_topic(
-> id int(4) auto_increment primary key not null,
-> content text,
-> author varchar(20) not null,
-> submittime timestamp(8) default current_timestamp,
-> forumid int(4) default 0,
-> title varchar(300) not null,
-> xq varchar(30) not null,
-> rq int(4) default 0,
-> forumname varchar(20)
-> );
ERROR 1064 (42000): 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 '(8) default current_timestamp,
forumid int(4) default 0,
title varchar(300) not ' at line 5
变成了
submittime timestamp default current_timestamp,