+ 1

Why does this cause "Syntax error in CREATE TABLE statement" error?

CREATE TABLE customers ( ID int(4), Name varchar(20), Age int(2), PRIMARY KEY(ID) ); I'm using MS Access

16th Aug 2019, 11:58 AM
Tashila Pathum
Tashila Pathum - avatar
2 Antworten
0
As seen here (https://www.w3schools.com/sql/sql_primarykey.asp) that format is for mySQL. try this instead: CREATE TABLE customers ( ID int(4) NOT NULL PRIMARY KEY, Name varchar(20), Age int(2) );
16th Aug 2019, 7:48 PM
Kyle Jones
Kyle Jones - avatar
0
Kyle Jones It still gives the same error 😐
22nd Aug 2019, 6:37 AM
Tashila Pathum
Tashila Pathum - avatar