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
OPTIMIZATION OF SP,CURSOR,TRIGGERS
Can sql server 2016 run on windows 7?
Explain the architecture of ms sql reporting service?
Explain indexed views and partitioned view with their syntax.
What is "scheduled jobs" or "scheduled tasks"?
What is the difference between index seek vs. Index scan?
How many columns can we include on clustered index ?
What do you mean by an execution plan?
How many triggers you can have on a table?
Explain the microsoft sql server delete command? : SQL Server Architecture
How to create prepared statements using odbc_prepare()?
In case you have filters in your report, when filters will be applied in cached report instance?
Explain different types of collation sensitivity?
How to use transact-sql statements to access the database engine?
What are xml indexes?