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 record from a particular table?

Answer Posted / srinivasan

WITH CTE AS
(
SELECT * ,ROW_NUMBER() OVER (PARTITION BY ID,NAME
ORDER BY ID DESC) AS RNUM FROM TABLE A
)

DELETE CTE WHERE RNUM >1

IF U HAVE ANY MORE DOUBTS
MAIL ME MCAVASAN@GMAIL.COM

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

let's assume you have data that resides on sql server 6.5. You have to move it sql server 7.0. How are you going to do it? : Sql server database administration

962


Explain what is meant by replication of database?

1039


What happens if null values are involved in comparison operations?

984


How to create new tables with "create table" statements in ms sql server?

1070


Explain what are page splits? : SQL Server Architecture

1072


Is oracle faster than sql server?

958


What is difference between index seek vs. Index scan?

1160


What is a DBMS, query, SQL?

1050


What happens if date-only values are provided as date and time literals?

1026


What is the difference between the 2 operating modes of database mirroring?

1115


What is “asynchronous” communication in sql server service broker?

1039


What is single-user mode?

947


What is inline table-value user-defined function?

1117


A user is a member of the public role and the sales role. The public role has select permission on all the tables. The sales role does not have select permission on some of the tables will the user be able to select from all tables?

964


Can you please differentiate between a primary key and a unique key?

1012