how to rest identity columns in sql server
Answer Posted / muthu kumar
create table t(id int identity(seed,increment))
where seed is starting number and increment is number to be
incremented.
create table t(id int identity(1,1),name varchar(50))
so the id will be start with 1 and will be incremented 1 by
1 each time when record is get insered
| Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
What is the preferred way to create a clustered and non-clustered index? Which index should you create first the clustered or non-clustered?
What are the differences in Clustering in SQL Server 2005 and 2008 or 2008 R2?
What are the results of running this script?
What is the difference between rank and dense_rank?
What is 2nf in normalization?
How to deploy the Report?
Does sql server 2016 have ssms?
Can you use order by when defining a view?
Is it possible to run multiple publications and different type of publications from the same distribution database? : sql server replication
On a windows server 2003 active – passive failover cluster, how do you find the node which is active?
Where actually sql azure database is hosted?
What is meant by dirty read?
How would you go about developing a ssrs report?
What is blocking and how would you troubleshoot it? : sql server database administration
what are candidate key, alternate key and composite key? : Sql server database administration