这是什么问题呢?
是不是order这个是一个关键字?
是不是order这个是一个关键字?
C:\Documents and Settings\zhou>mysql -u spider -p
Enter password: ******
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 57
Server version: 5.0.51a-community MySQL Community Edition (GPL)
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> create table if not exists spider.test(order int);
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 'order
int)' at line 1
mysql> create table if not exists spider.test(queue int);
Query OK, 0 rows affected (0.08 sec)
mysql>
本文记录了一次使用MySQL创建表时遇到的关键字冲突问题。尝试创建名为test的表,并包含一个名为order的字段时出现语法错误。通过将字段名更改为queue成功避免了与MySQL保留关键字的冲突。

被折叠的 条评论
为什么被折叠?



