0
CREATE TABLE IF NOT EXISTS customers (customer_id TEXT NOT NULL, time_stamp TIMESTAMP NOT NULL, customer_info TEXT), PRIMARY KEY (time_stamp)
SQL有什麼問題?
的錯誤是
mysql> CREATE TABLE IF NOT EXISTS customers (customer_id TEXT NOT NULL, time_stamp TIMESTAMP NOT NULL,
customer_info TEXT), PRIMARY KEY (time_stamp);
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 ' PRIMARY KEY (time_stamp)' at line 1
你得到什麼錯誤? – BoltClock 2010-11-25 02:06:35
是`PRIMARY KEY`之前的那個逗號嗎?順便說一下,時間戳對於客戶來說似乎不是一個好PK。它不應該是'customer_id`嗎? – Kos 2010-11-25 02:08:18