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 / venkat

Hope this methodology would help you better

1.Create a temp table
2.Select duplicated row's empid,empname into the temp table.
3.Create a cursor by selecting values from temp table.
4.Keep either min or max(empid) from original table and
delete the rest of the duplicated rows.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Difference between 2NF &3NF ?

1029


What are the rules to use the rowguidcol property to define a globally unique identifier column?

964


How to get @@error and @@rowcount at the same time?

984


How to delete database objects with "drop" statements in ms sql server?

1033


What are the steps you must follow to hide sql server instances?

929


What are database states in ms sql server?

1114


Do you know concepts and capabilities of sql server?

1005


What is the command dbcc checkdb used for?

963


What is the default server name for sql server?

1088


How do I perform an unattended install of sql server 2000?

1018


Can you explain various data region available in ssrs with their use?

916


What is the meaning of lock escalation and why/how to stop this? : sql server database administration

986


What are the properties of the transaction?

968


Why SQL Agent is used?

1065


Is port 1433 secure?

931