here id col have primary key and identity
id name
1 a
2 b
3 c
4 d
delete 2nd row then o/p will be
id name
1 a
3 c
4 d
next inssert 2nd row and i want o/p will be
id name
1 a
2 e
3 c
4 d
Answer Posted / qwerty
set identity_insert <table_name> on
insert into <table_name>(id,name) values(2,'e')
set identity_insert <table_name> off
| Is This Answer Correct ? | 12 Yes | 0 No |
Post New Answer View All Answers
What is the difference between commit and rollback?
What is the main purpose of having conversation group?
Does a sql server 2005 select statement require a from?
What is SQL Azure Federations?
What are extended events in sql server?
What are different type of Collation Sensitivity?
How many full-text indexes can a table have?
Please explain the characteristics of a transaction server for example atomicity, consistency, isolation, durability?
Does index slows down insert statements?
John exports information periodically from a microsoft sql server database to an oracle database what is the best way to do this?
What is unique key constraint?
What is store procedure? How do they work? When do you use?
What does truncate do?
How to check if a table is being used in sql server?
What are the tool windows in sql server management studio? : sql server management studio