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 retrieve duplicate rows in a table?
How to delete the duplicate entries in a table?

Answer Posted / lince thomas

it is very simple,,below
------------------------
select * from(
select row_number() over(partition by empname order by
empname)as rno,empname,salary from Emp1Pay)T
where T.rno>1


delete from Emp1Pay where empid=
(select empid from(select row_number() over(partition by
empname order by empname)as rno,empid
from Emp1Pay )T where T.rno>1)

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain boyce and codd normal form(bcnf)?

965


Explain external key management in sql server 2008

893


Which language is supported by sql server?

1019


What is store procedure? When do you use?

939


How to convert a numeric expression from one data type to another?

1023


What is a transact-sql statement?

1068


what is memory-optimized nonclustered indexes

1021


Explain the difference between functions and stored procedures in sql server?

984


What are the underflow and overflow behaviors on float literals?

1113


What are the requirements on sql server network connections?

1005


What is the function of sql server agent windows service?

1102


Suppose you want to implement the one-to-one relationships while designing tables. How would you do it?

959


Is resultset an interface?

979


What are page splits? : SQL Server Architecture

995


What is the difference between Normalization and De-normalization?

1099