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
Which feature in sql server 2008 has surprised you? You can name just one. : sql server database administration
create index myindex on mytable(mycolumn) what type of index will get created after executing the above statement? : Sql server database administration
How to defragment table indexes?
What is meant by dirty read?
Explain about temporary stored procedure?
Define self join?
How do I create a stored procedure in sql server?
How except clause is differs from not in clause?
What is the significance of null value and why should we avoid permitting null values?
Is sql server 2016 free?
What is cross join in sql server joins?
Define constraints and give an example of their use?
What is update locks?
What are the authentication modes in sql server? How can it be changed?
What is the return type of executeupdate ()?