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 / challa yerriswamy

set identity_insert <table_name> on
insert into text1(id,id_name) values(2,'insertedat2')

Is This Answer Correct ?    13 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the different types of normalization?

824


What are ddl triggers and types of ddl trigger?

799


Define right outer join in sql server joins?

742


Can we make the the chages By Using the Sql if u know any function or process please inform me Actuall result: BRK1 Break 1 Part 1 00:01:00:00 60 BRK1 Break 1 Part 2 00:01:00:00 60 BRK2 Break 2 Part 1 00:01:00:00 60 BRK2 Break 2 Part 2 00:01:00:00 60 BRK2 Break 2 Part 3 00:01:00:00 60 BRK3 Break 3 Part 1 00:01:00:00 60 BRK3 Break 3 Part 2 00:01:00:00 60 Desired O/P: BRK1 Break 1 Part 1 00:01:00:00 60 Part 2 00:01:00:00 60 BRK2 Break 2 Part 1 00:01:00:00 60 Part 2 00:01:00:00 60 Part 3 00:01:00:00 60

1926


You are designing a strategy for synchronizing an SQL Azure database and multiple remote Microsoft SQL Server 2008 databases. The SQL Azure database contains many tables that have circular foreign key relationships?

113


Write a sql query to delete duplicate records from a table called table1

788


Tell me in brief how sql server enhances scalability of the database system?

727


how many clustered indexes can be created on a table? : Sql server database administration

788


Explain concepts of analysis services?

688


Explain the various types of concurrency problem. I.e. Lost or buried updates, uncommitted dependency, inconsistent analysis, phantom read?

696


How can you start sql server in different modes?

724


What are the filtered indexes?

792


Can you tell me about the concept of ER diagrams?

814


How do we know if any query is retrieving a large amount of data or very little data?

742


Your sql server is running out of disk space. You notice that there are several large files with ldf extensions what are these files?

829