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
Can I delete event logs?
What is the security model used in sql server 2005?
How to recompile stored procedure at run time?
How to copy the tables, schema and views from one sql server to another?
Which are the two editions in which SQL Azure database available?
How do I create a partition table in sql server?
Mention what are the different types of ssrs reports?
What is de-normalization and what are some of the examples of it?
How do database indexes work?
What are the basic features of a trigger in ms sql server?
How to change parameter value inside the report?
How to change a login name in ms sql server?
what is the difference between Delete and Truncate command in SQL
What program is used to store the data source file?
What the difference between UNION and UNIONALL?