请问这个是怎么回事?(问题已解决)
mysql> CREATE TABLE tdb_goods_brands(
-> brand_id SMALLINT UNSIGNED PRIMARY KEY AUTO_INCREMENT,
-> brand_name VARCHAR(40) NOT NULL,
-> )
-> SELECT brand_name FROM tdb_goods GROUP BY brand_name;
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 ')
SELECT brand_name FROM tdb_goods GROUP BY brand_name' at line 4
最后这句提示是什么意思?
问题解决 mysql> CREATE TABLE tdb_goods_brands
-> (
-> brand_id SMALLINT UNSIGNED PRIMARY KEY AUTO_INCREMENT,
-> brand_name VARCHAR(60) NOT NULL
-> )
-> SELECT brand_name FROM tdb_goods GROUP BY brand_name;
Query OK, 10 rows affected (0.44 sec)
Records: 10 Duplicates: 0 Warnings: 0