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 the use of friend function? : Sql dba

543


What is bind variable in pl sql?

530


What is the basic structure of an sql?

573


What is a variable in sql?

514


Do we need to create index on primary key?

467






what does it mean to have quoted_identifier on? What are the implications of having it off? : Sql dba

530


what is blob? : Sql dba

564


Explain the the update statement in sql?

571


how many tables will create when we create table, what are they? : Sql dba

544


What are the most important characteristics of pl/sql?

578


Are left and right joins the same?

532


What is string join?

558


What are keys in sql?

551


What is the purpose of using pl/sql?

665


what is a field in a database ? : Sql dba

545