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 table in sql server

Answer Posted / smitha

;with empctc(empid,ename,sal,deptid,ranking)
as
(Select empid,ename,sal,deptid,ranking=Dense_rank() over (
partition by empid,ename,sal,deptid order by NEWID() asc)
from emp
)
delete * from empctc where ranking>1

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the beast way to write CTE in SQL Server ?

1054


What do you understand by the analysis services in sql server?

949


How do I setup a sql server database?

1081


What do you understand by the data quality services in sql server?

953


What is a trace frag? Where do we use it?

1108


What stored procedure can you use to display the current processes?

902


What is inner join in sql server joins?

1045


What is usually the first word in a sql query?

1141


What are the new features introduced in SQL Server 2000 (or the latest release of SQL Server at the time of your interview)? What changed between the previous version of SQL Server and the current version?

1084


List layers of abstraction microsoft architectured to provide relational db through cloud platform ?

183


What are the advantages of stored procedure in sql server?

897


What do you mean by authentication modes in sql server?

1090


Can you explain full-text query in sql server?

1018


What is tablesample?

1119


Does partitioning improve performance sql server?

987