Create an identity in sql2005
Posted on 2007-04-10
I am new to sql 2005.
I want to get to get an identifer column into a table (similar to access autonumber) but cant see how this is done.
I have an ID column set to int
I tried right clicking on the table to Modify but cannot get Identity into the datatype.
I tried a right click Script table as > Update to > New query editor window
SET [ID] = <ID, int,>
,[Name] = <Name, varchar(20),>
,[Type] = <Type, varchar(30),>
WHERE <Search Conditions,,>
I tried Identity and $Identity after int but it creates an error message.
Can anyone please advise how to do this?