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
Why olap is used?
What is the Control Flow in SSIS
Define views.
what are triggers? : Sql server database administration
What is the purpose of grouping data in a report?
How do I change my passwords (database, LDAP, and so on) without causing an outage?
What is the security principal at the server level that represents your session?
there is a trigger defined for insert operations on a table, in an oltp system. The trigger is written to instantiate a com object and pass the newly inserted rows to it for some custom processing. What do you think of this implementation? Can this be implemented better? : Sql server database administration
Is truncate autocommit?
Explain what role entity and relationship play in an ER diagram.
Explain “not null constraint” in sql server?
how can you find out if the current user is a member of the specified microsoft® windows nt® group or microsoft sql server™ role? : Sql server administration
What are the properties of sub-query?
Where can you add custom error messages to sql server?
What are different type of Collation Sensitivity?