Hiya all, i keep getting a
"Token line error=7, Token line offset=1, Token in error=CONSTRAINT" error message.
Using this code
Code:
Create Table Orders(
orderNumber bigint Not Null,
orderDate datetime Not Null,
completed bit Not Null,
discount numeric(2,1),
PRIMARY KEY(orderNumber)
CONSTRAINT FK_Orders_Store
FOREIGN KEY(StoreID) REFERENCES Store(StoreID)
CONSTRAINT FK_Orders_Pizza
FOREIGN KEY(itemCode) REFERENCES Pizza(itemCode)
)
(the below codes are seperate tables)
Code:
Create Table Store(
StoreID int IDENTITY,
town nvarchar(25) NOT NULL,
address nvarchar(50) NOT NULL,
PRIMARY KEY(StoreID)
)
Code:
Create Table Pizza(
itemCode int IDENTITY,
pizzaName nvarchar(25) NOT NULL,
baseType nvarchar(20) NOT NULL,
PRIMARY KEY(itemCode)
)
Any help?