Hello,
I am getting a syntax error in the following code, any suggestions what I need to modify?
Thanks
"Script line: 7 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 ')' at line 11"
CREATE TABLE STORE (
StoreID Integer NOT NULL AUTO_INCREMENT,
StoreName Char (20) NOT NULL,
City Char (12) NULL,
Country Char (15) NULL,
Phone Char (12) NULL,
Fax Char (12) NULL,
Email Char (20) NULL,
Contact Char (15) NULL,
CONSTRAINT StorePK PRIMARY KEY(StoreID, StoreName),
);
CREATE TABLE PURCHASE (
PurchaseID Integer NOT NULL AUTO_INCREMENT,
PurchaseDate Char (25) NULL,
Description Char (30) NULL,
Category Char (15) NULL,
PriceUSD Integer NULL,
StoreName Char(20) NOT NULL,
CONSTRAINT PurchasePK PRIMARY KEY(PurchaseID),
CONSTRAINT StoreFK FOREIGN KEY(StoreName)
REFERENCES STORE(StoreName)
ON UPDATE NO ACTION
ON DELETE NO ACTION
);