我曾嘗試以下查詢(它不是我自己寫的,但是包括從互聯網源代碼)MySQL的主鍵必須寫在括號
CREATE TABLE `city_list_count` (
`city_created` date NOT NULL,
`count_created` int(8) unsigned NOT NULL,
PRIMARY KEY `city_created`
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
它給了我下面的錯誤:
1064 - 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 ') ENGINE=InnoDB DEFAULT CHARSET=utf8' at line 5
雖然這是不壞張貼問題+答案你已經遇到了一些問題,我建議編輯問題和答案,以便問題部分真的只是問題的答案,答案部分答案。 –
更改了問題。現在它只包含問題描述。單獨提出我的迴應。 – user2513149