View Single Post
Old 11-30-2012, 08:28 PM   PM User | #5
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,210
Thanks: 59
Thanked 3,996 Times in 3,965 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
AGAIN, you are missing the COMMA!

You must have a COMMA after every declaration in the CREATE TABLE.

By the by, this is true in MySQL, SQL Server, Access, and most other DBs.

It would help if you would realize *WHERE* the declarations start and begin.

Thus:
Code:
Create Table Pizza(
    itemCode int IDENTITY, 
    pizzaName nvarchar(25) NOT NULL,
    baseType nvarchar(25),
    PRIMARY KEY(itemCode),
    CONSTRAINT FK_Pizza_Bases FOREIGN KEY(baseType) REFERENCES Pizza(baseType)
)
The lines in red and magenta show you the separate element declarations in that statement.

And by the by, this *IS* the MySQL forum. Your question is not about MySQL.
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
Old Pedant is offline   Reply With Quote