我有一個標準的LAMP配置(apache2,mysql,php5),在ubuntu上運行,我只是在我的終端中輸入mysql命令。我以root身份登錄到mysql命令行。到目前爲止,我已經創建了一個新的數據庫,但是現在出現了麻煩mysql語法錯誤1064(42000)
我想創建一個簡單的表,但得到一個MySQL語法錯誤,無法弄清楚我做錯了什麼。
這是錯誤:
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 ')' at line 10
這是我的查詢:
CREATE TABLE IF NOT EXISTS `customers` (
`uid` int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
`name` varchar(50) NOT NULL,
`email` varchar(50) NOT NULL,
`phone` varchar(100) NOT NULL,
`password` varchar(200) NOT NULL,
`address` varchar(50) NOT NULL,
`city` varchar(50) NOT NULL,
`created` datetime NOT NULL DEFAULT TIMESTAMP
);
不知道什麼是錯的誠實。