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 / sunilkumar
set identity_insert on
insert into test1(Id ,id_name) values (2 ,'insertedat2')
Is This Answer Correct ? | 7 Yes | 3 No |
Post New Answer View All Answers
What is a partitioned view?
Does full backup break log chain?
Explain what are the authentication modes in sql server?
What are the different types of sub-queries?
How to insert stored procedure result into temporary table?
What is raid? : SQL Server Architecture
Does any body please help me what question's have asked for SSRS in the interview?
Explain about local stored procedure?
How to convert numeric expression data types using the cast() function?
Does hive support indexing?
What are click through reports?
Stored Procedure returns data from multiple tables. How to access it in your ASP.Net code?
Are semicolons required at the end of sql statements in sql server 2005?
How to drop an existing schema in ms sql server?
What is query optimizer in sql server?