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 / boby

insert into <table_name>(id,name) values(2,'e')ORDER BY ID

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is an identity?

572


What are data resources?

506


Can you explain what is sql server english query?

541


Explain subquery and state its properties?

550


Mention the different types of triggers?

551






How to apply cascading referential integrity in place of triggers?

570


How do I shrink an ldf file?

572


How to convert a numeric expression from one data type to another?

503


How extra digits are handled with numeric data type literals?

522


What is the difference between DataRow.Delete() and DataRow.Remove()?

735


Can we perform backup restore operation on tempdb? : sql server database administration

585


I create a separate index on each column of a table. What are the advantages and disadvantages of this approach? : Sql server database administration

585


What are the basic functions for master, msdb, model, tempdb and resource databases? : SQL Server Architecture

566


List the advantages of using stored procedures?

563


What is difference between global temporary tables and local temporary tables?

661