July 26, 2010 at 12:02 am
Can any one please let me know the query for how to create a column in a table with
Identity = True
Identity seed = 1
Identity increment = 1 and the new column should be primary key..
Thanks in advance,
Vamshi.
July 26, 2010 at 12:05 am
Check Books On Line for the same, Even u will get some more important things about Identity Columns...
July 26, 2010 at 1:17 am
simple example
create table tablename (
ObjectID int identity(1,1) not null constraint PK_Tablename primary key,
column2 int,
.
.
.
column N int
)
go
Thanks,
Amit Kulkarni
July 26, 2010 at 11:42 am
i'm lazy and use the GUI for it
go to table, right click and design. select the column and on the bottom is the option to add identity
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply