口袋妖怪藤皇蛇技能:mysql建表出现的问题

来源:百度文库 编辑:高校问答 时间:2024/04/24 10:59:15
这是我的建表代码,编译过后系统提示invalid default value for 'id',请问怎样解决?我初学请各位高手指点迷津!谢谢!!
mysql> create table td_guestbook (id bigint(10) default '0' not null auto_increment,name varchar(30) not null,qq varchar(30)default 'no' not null,email varchar(100) default '0' not null,homepage tinyint(1) default '0' not null,headima bigint(19) default '0' not null,time bigint(19) default '0' not null,content text not null,primary key(id));

mysql> create table td_guestbook (
id bigint(10) not null auto_increment,
name varchar(30) not null,
qq varchar(30)default 'no' not null,
email varchar(100) default '0' not null,
homepage tinyint(1) default '0' not null,
headima bigint(19) default '0' not null,
time bigint(19) default '0' not null,
content text not null,
primary key(id)
);

id 是自动增加的,可怎么还写默认值为0呀