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

What does executeupdate return?

1033


What is an execution plan?

1233


Explain logical operators in sql server?

1179


What is the difference between the 2 operating modes of database mirroring?

1160


Explain the steps needed to create a scheduled job?

976


What is collation?

1191


Scalability, Availability, Integration with internet, etc.)?

2931


Do you know what are the differences between lost updates and uncommitted dependencies?

1135


Explain the purpose of indexes?

1017


What is database black box testing?

1070


Can we run Reporting Services with SQL Server express edition, which is a free version of SQL Server?

125


What is transaction server distributed transaction?

1126


How to add more data to the testing table in ms sql server?

1161


Explain DBCC?

1013


Is it true, that there is no difference between a rule and a check constraint?

1109