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 to replace the Query Result 'Null Value' with a text ?

565


How many database files are there in sql server 2000?what are they?

583


What is partition index in sql server?

608


Explain about extended stored procedure?

490


How many types of database relationship in sql server?

563






Do you know what are the properties of the relational tables?

577


What is identity?

557


What is a cube? : sql server analysis services, ssas

566


Can I work with several databases simultaneously? : sql server management studio

564


While migrating Microsoft SQL Server 2008 database to SQL Azure, what can be done to ensure the database connectivity does not degrade?

88


What guidelines should be followed to help minimize deadlocks?

509


what is the Ticketing tool used in Wipro technologies at Bangalore...???

7480


Tell me extended events in sql server 2008?

563


Can sql servers linked to other servers like oracle?

548


Do you know the cursor optimization tips?

590