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
If a stored procedure is taking a table data type, how it looks?
What is sql server schema compare? How we can compare two database schemas?
How to deploy the Report?
Can We Use Data-grids For Our Report In Ssrs?
How to test odbc dsn connection settings?
What is query optimization process?
Why we use the openxml clause?
What the different components in replication and what is their use?
User wants only to display only pdf as export option in report manager. How to achieve this?
What options are there to delete rows on the publisher and not on the subscriber? : sql server replication
What are the steps you will take to improve the performance of a poor performing query?
What are cascading parameters in ssrs reports?
Create and insert into temp table in sql server?
How to create an index on an existing table in ms sql server?
How many types of database relationship in sql server?