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
what are questions asked in TCS for database tester (sqlserver)for 2-3 exp?
What is application role in sql server database security? : sql server security
Explain “row_number()” in sql server with an example?
How to download and install microsoft sql server management studio express?
what is the Ticketing tool used in Wipro technologies at Bangalore...???
Equi join and non equi join is possible with sql server?
What does truncate do?
can we have a nested transaction? : Sql server database administration
how you can get the list of largest tables in a database? : Sql server administration
as a general practice, it is recommended to have dbo be the owner of all database objects however, in your database you find number of tables owned by a user other than dbo, how could you fix this? : Sql server administration
What is log in sql server?
what authentication modes does sql server support? : Sql server database administration
How can change procedure in sql server?
What is the difference between clustered index and primary key?
What are recommended options to be used while using db mirroring? : sql server database administration