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

Table structure :-

empid empname
1 bala
2 bala
3 bala
4 bala
5 arun
6 arun
7 arun
8 ram
9 ram

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

By
Kumar

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you improve the performance of a SQL Azure Database?

137


What are the differences between stored procedure and view in sql server?

1226


What is the difference between DataRow.Delete() and DataRow.Remove()?

1220


Is candidate a key?

940


What is the security principal at the database level that represents your session?

927


you added a row to a view, but the row is not shown on the view. Explain how this can happen, and how you can remedy the situation

928


How does a profiler work?

915


What is index fragmentation in ms sql server?

1069


How can you check the level of fragmentation on a table?

1036


Can a stored procedure call itself or a recursive stored procedure? How many levels of sp nesting is possible?

1061


What's the information that can be stored inside a bit column?

989


What is a trace frag? Where do we use it?

1093


Explain the usage of floor function in sql server.

952


What is always encrypted?

979


What is the correct order of the logical query processing phases?

928