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

in tabase table having a column in it empname field is
there which having 5 duplicate values is there i want
deleted all the duplicates i want showing only one name
only.

Answer Posted / karna

delete from emp where empid not in(select max(empid) from
emp group by empname having count(*)>=1)

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we take the full database backup in log shipping?

901


Does group by or order by come first?

900


How do I port a number to sql server?

983


Write a SQL query to delete a table?

1079


you accidentally delete the msdb database what effect does this have on your existing sql databases, and how do you recover? : Sql server administration

1195


How many types of functions are there in sql server?

878


What is the difference between a primary key and a unique key? Are they the same?

1011


What is a database in ms sql server?

995


How much memory that we are using in Logshipping Concept?

1730


What is Federation and Federation Member?

92


How is table type constraint applied to a table?

936


What does the update command do?

1052


Explain what is the purpose of sql profiler in sql server?

1011


What are diverse clauses that form a part of sql?

1018


Mention a few common trace flags used with sql server?

885