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

How do you test your database? : sql server database administration

1023


What are the restrictions applicable while creating views? : SQL Server Architecture

1024


Why we need sql server?

970


What is table join?

1119


Why use “in” clause in sql server?

1072


What is the purpose of self join?

975


What is a data collection table?

1008


How to write character string constants or literals in ms sql server?

1026


What do you understand by triggers and mention the different types of it?

941


What is your recommendation for a query running very slow? : sql server database administration

1048


how can a database be repaired? : Sql server administration

974


when would you go for denormalization? : Sql server database administration

872


Explain about sql server login?

1088


What are the tools available in market as an alternative to sql server reporting services?

131


What is the beast way to write CTE in SQL Server ?

1046