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 / pradeep aryan
set identity_insert on
insert into test1(Id ,id_name) values (2 ,'e')
set identity_insert off
Is This Answer Correct ? | 0 Yes | 3 No |
Post New Answer View All Answers
What can be used instead of trigger?
What is a dbms wizard?
Define normalisation?
How to reaname table name without using sp_Rename in sql server..?
How to connect php with different port numbers?
How should i optimize the time for execution of stored procedure having single input and many output from the different tables?
Can a synonym name of a table be used instead of a table name in a select statement?
What is difference between clustered index and non clustered index?
How to loop through result set objects using mssql_fetch_array()?
How do you delete duplicate rows in sql server?
What is the Difference Between Primary and Foreign Key?
What is the language structure to add a record to a table?
What is hierarchy, what are its types and difference between them? : sql server analysis services, ssas
List out the difference between union and union all in sql server?
What are the Advantages of using CTE in sql server?