Is it possible to delete duplicate rows in a table without
using a temporary table ?
Answer Posted / krishnaraj p n
Can be done in a simple way.
DELETE FROM <TABLE NAME > WHERE <COLUMN NAME >IN
(
SELECT <COLUMN NAME> FROM <TABLE NAME >
GROUP BY <COLUMN NAME>
HAVING COUNT(<COLUMN NAME>) > 1
)
| Is This Answer Correct ? | 1 Yes | 4 No |
Post New Answer View All Answers
How to delete database objects with "drop" statements in ms sql server?
Can We Use Data-grids For Our Report In Ssrs?
What happens if strings are casted into wrong code pages in ms sql server?
What is a functions and types in sql server?
What are the differences between having and where clause.
What is the use of “join” in sql server?
What is the maximum length of an alert name?
How can you insert values in multiple rows using one Insert statement?
How would you choose between a clustered and a non-clustered index?
What is the purpose of floor function?
Explain timestamp datatype?
Explain the truncate command?
What are the features of Embedded SQL
What is the usage of the sign function?
How to create an index on an existing table in ms sql server?