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

what is a deadlock? : Sql server database administration

1047


What is database architecture? : SQL Server Architecture

1032


What is partition, how will you implement it? : sql server analysis services, ssas

1040


there is a trigger defined for insert operations on a table, in an oltp system. The trigger is written to instantiate a com object and pass the newly inserted rows to it for some custom processing. What do you think of this implementation? Can this be implemented better? : Sql server database administration

906


Explain the difference between primary keys and foreign keys?

1014


How do I know if localdb is running?

941


What is log shipping?

954


To automatically record the time on which the data was modified in a table, which data type should you choose for the column?

956


How to create new tables with "select ... Into" statements in ms sql server?

983


Define clusters?

1051


John exports information periodically from a microsoft sql server database to an oracle database what is the best way to do this?

933


What is statement level trigger?

977


What is ems sql management studio? : sql server management studio

1099


Explain what is lock escalation?

1055


What do you understand by physical_only option in dbcc checkdb?

973