how to delete duplicate rows from a specified table(only
single table)
how do you know which join is need to be used
Answer Posted / arif jameel
First add an Identity Column in table
Alter table <tblname>
Add < New_columnID > int identity(1,1)
Delete from <tblname> where < New_columnID> in
(select max(New_columnID)from <tblname>
Group by <tbl_columnname>
having count (<tbl_columnname>)>1)
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
What are the most important ddl statements in sql?
What is the clause we need to add in function body to return variable?
What is the difference between microsoft sql and mysql?
What are dml commands?
Explain the purpose of %type and %rowtype data types?
How is data stored in sql?
How to convert comma separated string to array in pl/sql?
How do I remove duplicates in two columns?
Compare sql & pl/sql
what's the difference between a primary key and a unique key? : Sql dba
What does select count (*) mean in sql?
When to use inner join and left join?
How do I add a primary key to a table?
which command using query analyzer will give you the version of sql server and operating system? : Sql dba
What is the difference between inner join and natural join?