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 using sql server 2005 server mgmt studio. I tried to create a table with the following commands and it fails on the auto-increment command.USE "mydatabase";CREATE TABLE "stable" ( "id" bigint(20) NOT NULL auto_increment, "ip" varchar(50) default NULL, "hname" varchar(100) default NULL, "time" time default NULL, "date" date default NULL, "fname" varchar(50) default NULL, PRIMARY KEY ("id"));I get:Msg 102, Level 15, State 1, Line 4Incorrect syntax near 'auto_increment'.Shouldn't this work?
SwePeso
Patron Saint of Lost Yaks
30421 Posts
Posted - 2009-08-16 : 08:14:33
Date and Time datatypes are available for SQL Server 2008 and later.