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 is row_number function?
Explain raiserror in sql server?
What is a rownum?
How to get the number of affected rows?
Can a table be moved to different filegroup?
How to find which stored procedure is currently running in sql server?
what is a default tcp/ip socket assigned for sql server? : Sql server database administration
How to delete database objects with "drop" statements in ms sql server?
What happens when transaction log is full?
What is a table called, if it has neither cluster nor non-cluster index? What is it used for?
How do I debug a stored procedure in sql server?
What do you understand by coalesce in sql server?
Which is the latest version of sql server and when it is released?
Is sql server a database?
what is the difference between them (ethernet networks and token ring networks)? : Sql server database administration