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 a user-defined function in the sql server and what is its advantage?
What is the architecture of ms sql reporting service?
How to create a local temporary stored procedure?
How to create nested stored procedure?
What do you mean by data integrity?
What are the advantages of using third-party tools?
Explain how many types of relationship?
What are database states in ms sql server?
Data is not being delivered to subscribers, what can be the possible reasons? : sql server replication
What are the different types of locks in the database?
How do you troubleshoot errors in a SQL Server Agent Job?
What is create command?
When to use null data driven subscription?
Why do we need different type of parameter?
How to verify a user name with sqlcmd tool?