Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 are the most important ddl statements in sql?

1116


What is the clause we need to add in function body to return variable?

1012


What is the difference between microsoft sql and mysql?

962


What are dml commands?

1020


Explain the purpose of %type and %rowtype data types?

928


How is data stored in sql?

1061


How to convert comma separated string to array in pl/sql?

1184


How do I remove duplicates in two columns?

1067


Compare sql & pl/sql

1141


what's the difference between a primary key and a unique key? : Sql dba

1050


What does select count (*) mean in sql?

1018


When to use inner join and left join?

959


How do I add a primary key to a table?

1042


which command using query analyzer will give you the version of sql server and operating system? : Sql dba

1064


What is the difference between inner join and natural join?

1006