Ann K
asked on
Syntax Error in Query
Same thing goes for the CONSTRAINT section:
CREATE TABLE Cart
(
[ID] INT IDENTITY(1,1) NOT NULL,
[ClientID] NVARCHAR(50) NOT NULL,
[ProductID] INT NOT NULL,
[Amount] INT NOT NULL,
[DatePurchased] DATETIME DEFAULT GETDATE(),
[IsInCart] BIT NOT NULL,
CONSTRAINT [PK_Purchase] PRIMARY KEY CLUSTERED([ID] ASC)
)
Curiousity overwhelms me ... Why would you ask a question like 'Where is the error?' without telling us what the syntax error is when executed? Are we supposed to guess?
Clicking the Parse button (looks like a check) in the upper center of your screen will parse your query, and if when parsing it generates an error will display that error in the Results tab, lower center of your screen. Parsing will compile your code without executing it. Hitting the Execute button will also display errors, but also execute the command.
_agx_ is correct, rounded parents ( ) instead of squiggly parents { }.
Clicking the Parse button (looks like a check) in the upper center of your screen will parse your query, and if when parsing it generates an error will display that error in the Results tab, lower center of your screen. Parsing will compile your code without executing it. Hitting the Execute button will also display errors, but also execute the command.
_agx_ is correct, rounded parents ( ) instead of squiggly parents { }.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank You.
CREATE TABLE Cart
( <=== parenthesis
....
) <=== parenthesis