While trying to create two foreign keys at the time of creating a table, I am getting these errors:
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 'references customer customerid, foreign key productid references product prodc' at line 8
My query:
create table orders(
orderid varchar(10) primary key,
productid varchar(10) ,
customerid varchar(10) ,
dateoforder date,
dateofdelivery date,
paid decimal(12,2),
foreign key customerid references customer (customerid),
foreign key productid references product (prodcode)
);