日期:2014-05-16  浏览次数:20892 次

win7系统中运行MYSQL 这个语句怎么老是错误啊
CREATE TABLE staff
(rank ENUM('employee','manager','contractor') NOT NULL, POSITION VARCHAR(100),
 id INT NOT NULL AUTO_INCREMENT PRIMARY KEY(rank,id));
  提示: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 '(id))' at line 3


------解决方案--------------------
CREATE TABLE staff
(rank ENUM('employee','manager','contractor') NOT NULL, POSITION VARCHAR(100),
id INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(rank,id));

与WIN无关,你少写了个逗号,SQL语句语法错误。
------解决方案--------------------
一字千金了

一个",",占1个字符,相当于半个汉字,所以,value=1000/2=500金