[讨论]诡异的MYSQL!
mysql> create table article(-> id int(11) primary key not null auto_increment,
-> title varchar(255) not null,
-> content text,
-> tid int(11) not null,
-> fid int(11) not null,
-> author varchar(20) default null,
-> editor varchar(20) default null,
-> connection varchar(254) default null,//这里的connection
-> writefrom varchar(255) default null,
-> flag int(11) not null default '0',
-> time datetime default null,
-> hits int(11) default '0',
-> tag int(11) not null default '0',
-> date date default null
-> )TYPE=MyISAM;
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 'conne
ction varchar(254) default null,
writefrom varchar(255) default null,
flag ' at line 9
mysql> create table article(
-> id int(11) primary key not null auto_increment,
-> title varchar(255) not null,
-> content text,
-> tid int(11) not null,
-> fid int(11) not null,
-> author varchar(20) default null,
-> editor varchar(20) default null,
-> conection varchar(254) default null,//这里把connection改成了conection,居然OK了!
-> writefrom varchar(255) default null,
-> flag int(11) not null default '0',
-> time datetime default null,
-> hits int(11) default '0',
-> tag int(11) not null default '0',
-> date date default null
-> )TYPE=MyISAM;
Query OK, 0 rows affected, 1 warning (0.16 sec)
这究竟是为什么呢?我用的是5.0,上面那个在4.0中没有问题,拿过来就要去掉那个n,莫非MySQL5.0认识conection,诡异啊~~~~
[此贴子已经被作者于2007-4-17 20:11:33编辑过]