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 / s pattnaik

SET IDENTITY_INSERT dbo.test1 OFF
Then
insert into test1(Id ,id_name) values (2 ,'insertedat2')

Is This Answer Correct ?    6 Yes 12 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why is replication required on the sql server?

655


What is built-in function?

618


What is sqlcmd?

629


How to use wildcard characters in like operations in ms sql server?

694


How to remove duplicate rows from table?

711






Can a database be shrunk with users active?

697


How to add more data to the testing table in ms sql server?

643


how can you attach more than 20 ldf files in sql server

1648


What is command parameter in ssrs?

130


What are the advantages of using stored procedures in sql server?

587


Which is the best place or learning center for MS SQL?????In Bangladesh?????

1668


What are window functions in sql server?

596


What is indexed view? How to create it?

675


What do you understand by check constraint in sql server?

558


What is the importance of a recovery model?

697