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

How can sql server instances be hidden? : sql server security

747


What is sql server english query?

744


How will you go about resolving deadlocks?

698


Do you know hot add cpu in sql server 2008?

727


How to create a login account in ms sql server to access the database engine using "create login" statements?

735






How do you start single user mode in clustered installations?

709


What is the significance of master, tempdb and model databases?

708


Tell me the use of keyword with encryption. Create a store procedure with encryption?

753


what is a sub-report?

113


Explain the truncate command?

680


What is temporary table in sql server? Why we use temp table?

703


What is temporal data type?

661


List out the difference between union and union all in sql server?

677


What are the different types of normalization?

809


When to use null data driven subscription?

190