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
How to use column default values in insert statements in ms sql server?
as a general practice, it is recommended to have dbo be the owner of all database objects however, in your database you find number of tables owned by a user other than dbo, how could you fix this? : Sql server administration
How can delete duplicate records in cte in sql server?
how to overcome kernel isssues
How to delete multiple rows with one delete statement in ms sql server?
What is DCL?
how can you check the level of fragmentation on a table? : Sql server administration
What are the different types of replication you can set up in sql server?
What is page in sql server?
explain different types of backups avaialabe in sql server? Given a particular scenario, how would you go about choosing a backup plan? : Sql server database administration
What to check if a User database is locked?
What are the advantages of log shipping?
What is function of ROLLUP ?
Should you normalize audio?
How does using a separate hard drive for several database objects improves performance right away?