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 sql view?
What is sql server 2000 work load governor?
Define right outer join in sql server joins?
How to rename an existing column with the "sp_rename" stored procedure in ms sql server?
What is the recovery model?
Which are the new data types introduced in sql server 2008?
Define left outer join in sql server joins?
what is a check constraint?
What does indexation mean?
Write the syntax for stuff function in an sql server?
What are the different types of columns types constraints in the sql server?
Why union all is faster than union?
What is transaction server isolation?
Why do we need normalization?
Define msdb database?