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
How to find the login name linked to a given user name?
How can you check the level of fragmentation on a table?
Do you know what is sql service broker?
What are the different types of collation sensitivity in sql server?
What are system databases into sql server (2005/2008)?
Which autogrowth database setting is good?
How to perform backup for certificates in sql server? : sql server security
Suggest a method of joining two tables.
How to create a new table in a given schema?
What are key, name and value columns of an attribute? : sql server analysis services, ssas
Which sql server table is used to hold the stored procedure script?
How to filter records of table in SQL SERVER?
you notice that the transaction log on one of your databases is over 4gb the size of the data file is 2mb what could cause this situation, and how can you fix it? : Sql server administration
what are the core components of SSRS?
You have modified 100 store procedures and want to replicate these changes from development to prodution, and production can have users using the Server/DB, how would you replicate without causing issues?