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 / dinesh gupta

Kumar your query do not solve the purpose accurately.

It should be as

Delete from employee where empid
not in (Select min(empid) from employee group by empname
having count(empname)>=1)

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain transaction server explicit transaction?

971


How can we rewrite sub-queries into simple select statements or with joins?

1027


What do we have to check in database testing?

1055


Create a dts package to produce a text file using the ‘update statistics’ command for the tables in a database with obsolete statistics.

1097


Which command is used for user defined error messages?

1103


What is set nocount on and what is set nocount off?

993


What is the difference between implicit and explicit transaction?

1052


What is use of attribute hierarchy optimized state? : sql server analysis services, ssas

1107


What number sorts of privileges are accessible in sql?

1085


What is the ‘fillfactor’?

1013


What is the difference between NOROW and LOCKROW?

2899


Explain what are sparse columns?

1064


what is a self join? : Sql server database administration

1117


What are the different types of backups that exist?

1216


Do you know what is a trace frag? Where do we use it?

1040