Is it possible to delete duplicate rows in a table without
using a temporary table ?

Answer Posted / kumar

sno names
1 arun
2 arun
3 arun
6 arun
7 bala
11 bala
12 guna
9 guna
14 guna
10 raj
13 raj

Table Name T1
Fields Names Sno,Names
Delete From t1 where sno not in
(select min(sno) from t1 group by names)

Is This Answer Correct ?    17 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is sub-query in sql server?

658


sql database suspect We have a sql database that is showing as suspect. How can we recover?

1395


What is partition, how will you implement it? : sql server analysis services, ssas

591


Is truncate a dml command?

490


What is an index. What are the types?

575






How to change the password of a login name in ms sql server?

551


I have triggers,views,functions,stored Procedures for a table. When I am dropping that table which objects are deleted?

593


Explain raiserror in sql server?

567


How to delete existing rows in a table?

578


Explain indexed views and partitioned view with their syntax.

671


How to run sql server 2005 books online on your local system?

510


What is a mixed extent?

581


How to use subqueries in the from clause in ms sql server?

558


How to check parameter value in stored procedure sql server?

454


Which are the new data types introduced in sql server 2008?

500