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 / challa yerriswamy
set identity_insert <table_name> on
insert into text1(id,id_name) values(2,'insertedat2')
Is This Answer Correct ? | 13 Yes | 0 No |
Post New Answer View All Answers
Can you type more than one query in the query editor screen at the same time?
How optimize sql query with multiple joins in sql server?
Why can there be only one clustered index and not more than one?
Explain “row_number()” in sql server with an example?
What are the different ways you can create databases in sql server?
How do I create an extended event in sql server?
What is the full form of ddl?
What happens if null values are involved in bitwise operations?
What is a View ? Can we insert, Update and delete a view?
Explain steps of normalization?
You notice that the transaction log on one of your databases is over 4gb the size of the data file is 2mb what could cause this situation, and how can you fix it?
What is a Join and explain its types?
How to provide values to user defined function parameters?
Explain what is use of dbcc commands?
What is the difference between truncate and delete commands?