2016-03-07 68 views
0
創建MySQL數據庫

我有我的數據庫中創建一個表下面的查詢,但我得到了一個錯誤:與XAMPP

CREATE TABLE student (
    accountNumber INT NOT NULL PRIMARY KEY, 
    firstName CHAR(20), 
    lastName CHAR(20), 
    courseID VARCHAR(6), 
    grade DOUBLE(3) 
) 

我得到的錯誤是:

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '))' at line 1

回答

0

你不如果聲明主鍵,則不需要NULL ...因爲該鍵始終需要可用