I can't seem to find the reason why Mysql keeps failing to create the following table. Error 1064 displayed
" 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 'order ( orderId int not null auto_increment primary key,
clientId int not nu' at line 1"
CREATE TABLE order (
orderId int not null auto_increment primary key,
clientId int not null,
delivery boolean not null default 0,
isOpen boolean not null default 1,
foreign key (clientId) references user (uid),
createdAt timestamp not null default current_timestamp,
updatedAt timestamp not null default current_timestamp on update current_timestamp);
I tried removing the foreign key to see if it was the issue, but it didn't work. Couldn't find anything online yet to the problem.