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 do you mean by an execution plan? Why is it used?

954


How to change parameter value inside the report?

153


in the physical file layout, where should the transaction log be stored in relation to the data file? : Sql server administration

1008


Difference between LEN() and DATALENGTH() in sql server ?

1062


Explain the various types of concurrency problem. I.e. Lost or buried updates, uncommitted dependency, inconsistent analysis, phantom read?

887


How do I find the size of a sql server database?

879


What are extended events in sql server?

905


what are the core components of SSRS?

121


What is clr ddl trigger?

914


What are the authentication modes in sql server? How can it be changed?

1057


What kind of problems occurs if we do not implement proper locking strategy?

1358


What is attribute hierarchy? : sql server analysis services, ssas

963


What is the syntax to execute the sys.dm_db_missing_index_details? : sql server database administration

1080


can a table be moved to different filegroup? : Sql server administration

913


What do you need to connect php to sql server?

1042