Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
I am not too sure why I am getting that error !CREATE Database Chapter5; GOUSE Chapter5;CREATE TABLE dbo.AuditAccess ( AuditAccessID int IDENTITY (1,1) NOT NULL, UserName Varchar(50) NOT NULL, LoginTime Datetime NULL, CONSTRAINT [PK_AuditAccess_AuditAccessID] PRIMARY KEY CLUSTERED ( AuditAcessID ) );Msg 102, Level 15, State 1, Line 2Incorrect syntax near 'AuditAccess'.Thanks,
robvolk
Most Valuable Yak
15732 Posts
Posted - 2009-05-11 : 17:14:55
Try this (fixed typo in red)
CREATE Database Chapter5;GOUSE Chapter5;GOCREATE TABLE dbo.AuditAccess(AuditAccessID int IDENTITY (1,1) NOT NULL,UserName Varchar(50) NOT NULL,LoginTime Datetime NULL,CONSTRAINT [PK_AuditAccess_AuditAccessID] PRIMARY KEY CLUSTERED(AuditAccessID));