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 domain constraint give an example?
What languages bi uses to achieve the goal?
How do I view a trc file?
What is checkpoint process in the sql server?
What is the purpose of linked server configuration in sql server?
Describe triggers features and limitations?
How to create a user to access a database in ms sql server using "create user" statements?
When we should use @@error?
Where are full-text indexes stored?
What is sql profiler. What are the default templates with it? : sql server database administration
Define candidate key, alternate key, and composite key.
How to delete duplicate records based on single column from a table?
What is SubQuery in SQL Server 2008
What is the command dbcc checkdb used for?
What is trigger explain with program?