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 add code to the existing article (using improve article)?
How to set database to be single_user in ms sql server?
Please explain that what are the basic functions for master, msdb, model, tempdb and resource databases? : SQL Server Architecture
How except clause is differs from not in clause?
Due to some maintenance being done, the sql server on a failover cluster needs to be brought down. How do you bring the sql server down?
What is bit data type?
What is normalization process?
What encryption security is available in sql azure?
When would you use sql joins?
Explain transaction server isolation?
Data table as parameter in sql server?
how can you select rexcord(rows) from table A which is not present in Table B . Id being the FK in Table B referencing to ID Table A
How to include text values in sql statements?
What is trace flag in sql server?
What is the syntax to execute the sys.dm_db_missing_index_details?