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...

Write a query to delete duplicate records in SQL SERVER

Answer Posted / kalyan

with [TN ordered by CN] as
(
select row_number() over(partition by CN order by CN) as
rowid,* from TN
)
delete from [TN ordered by CN] where rowid > 1

Is This Answer Correct ?    1 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Do you know what is sql injection?

1004


What is a Join and explain its types?

1106


How many columns can we include on clustered index ?

993


Name few of the dcl commands in sql?

1012


What is the difference between an index and a unique index?

1006


your distribution database is full what will u do

2178


List out different types of normalizations in sql server and explain each of them?

934


Differentiate between sql temp table vs table variable?

887


Explain difference between cross join and full outer join?

1012


Explain the third normal form(3nf)?

950


Delete duplicate rows without using rowid.

1538


What is the difference between having clause and where clause in sql server?

1106


What happens if null values are involved in string operations?

996


What are different types of schemas?

947


How to transfer data from a cursor to variables with a "fetch" statement?

1103