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
You want to implement the one-to-many relationship while designing tables. How would you do it?
what is a self join? : Sql server database administration
Explain indexed views?
What do you understand by sql server agent?
Define candidate key, alternate key, and composite key.
Some queries related to SQL
Explain external key management in sql server 2008
What is the difference between char and varchar2 datatype in sql?
How to drop an existing user defined function in ms sql server?
How to rebuild the master database?
explain what is a deadlock and what is a live lock? How will you go about resolving deadlocks? : Sql server database administration
What are the advantages of having an index on the sql server?
What are the 7 disadvantages to a manual system?
How can we improve performance by using SQL Server profiler?
what is memory-optimized nonclustered indexes