Write a query to delete duplicate records in SQL SERVER
Answer Posted / vaishali
set rowcount 1
delete from stud
where (select count(*) from stud a where stud.roll_no =
a.roll_no) > 1
while @@rowcount<>0
delete from stud
where (select count(*) from stud a where stud.roll_no =
a.roll_no) > 1
set rowcount 0
| Is This Answer Correct ? | 3 Yes | 6 No |
Post New Answer View All Answers
What the different topologies in which replication can be configured?
Describe the functionalities that views support.
What is standby servers? Explain types of standby servers.
How secure is sql server database?
What is 3nf normalization?
How to insert and update data into a table with "insert" and "update" statements?
How to create prepared statements using odbc_prepare()?
What is mscorsvw.exe - process - microsoft .net framework ngen?
What are the functions in sql server?
What are system databases into sql server (2005/2008)?
Do you think BCNF is better than 2NF & 3NF? Why?
What is a constant or literal in ms sql server?
What is conditional split?
Why are sql functions used?
Define tool Manage Statistics in SQL Server 2000 query ?