Rhett Claypool Rhett Claypool - 13 days ago 6
MySQL Question

getting syntax error at line 4 in MySQL

Create Table ITEM (
ItemID Char(25) Not Null
, ItemName Char(25) Not Null
, ItemPrice Decimal(5, 2) Not Null
, QuantityonHand Int Not Null
, Primary Key (ItemID)
);

Answer

Try doing this,

Create Table ITEM (
 ItemID Char(25) Not Null PRIMARY KEY,
 ItemName Char(25) Not Null,
 ItemPrice Decimal(5, 2) Not Null,
 QuantityonHand Int Not Null
);
Comments