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


Please Help Members By Posting Answers For Below Questions

What is a temp table?

792


What is graph sql?

773


Can a table contain multiple primary key’s?

874


how does a local variable is defined using t-sql? : Transact sql

790


how to rename an existing table in mysql? : Sql dba

795


How many aggregate functions are available there in sql?

773


Can a table contain multiple foreign key’s?

793


What is $$ in sql?

788


How can check sql version from command line?

791


Which is better trigger or stored procedure?

744


What are pl sql data types?

784


Which data dictionary views have the information on the triggers that are available in the database?

1013


Does postgresql run on the cloud?

856


What is the difference between the sql*loader and import utilities? : aql loader

813


What is the use of partition by in sql?

782