I'm getting a mysql create table syntax error and hoping someone can spot it before I loose my sanity.
create table buyer_representations (
Key int not null auto_increment,
Client_ID int not null,
Start_Time varchar(5),
Start_Date date,
End_Date date,
Property_Type varchar(255),
Geographic_Location varchar(255),
Commission varchar(255),
Alternate_Commission varchar(255),
Lease_Commission varchar(255),
Holdover varchar(255),
Clauses varchar(2000),
primary key (Key)
);
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 'int not null auto_increment, Client_ID int not null, Start_Time varchar(5), Star' at line 2
mysql Ver 14.14 Distrib 5.7.29, for Linux (x86_64) using EditLine wrapper
I tried adding 'primary key' at the end of line 2, as well a default value, and switching up 'not null' with 'auto_increment' .. but nothing is working.
Edit: I also tried changing Key to KeyId, and putting Key in quotes .. but the error remains the same.
Final Edit: putting Key inside backquotes finally worked
create table buyer_representations (
`Key` int not null auto_increment,
Client_ID int not null,
Start_Time varchar(5),
Start_Date date,
End_Date date,
Property_Type varchar(255),
Geographic_Location varchar(255),
Commission varchar(255),
Alternate_Commission varchar(255),
Lease_Commission varchar(255),
Holdover varchar(255),
Clauses varchar(2000),
primary key (`Key`)
);