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 a single table,How to retrieve a employee-id of an
employee who works in more than one department?

Answer Posted / anonymous

select emp_id from employee where dept in (select distinct
dept from employee) group by emp_id having count(*) >1;

Is This Answer Correct ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between isnull and coalesce?

1010


How can record locking be achieved in those DB2 versions which do not support it?

1021


What are the contents of dclgen?

1053


What does reorg do in db2?

985


What action db2 takes when a program aborts in the middle of a transaction?

1092


Is it possible to create an Instance in DB2 using DB2 Control Center ?

1045


Which is faster delete or truncate?

1070


What is db2 plan table?

995


How do I add a column in db2?

1000


How do I optimize a query in db2?

1042


I understand Join always perform better than subqueries. Then what is the advantage/use of Subqueries/correlated subqueries etc.,in DB2 programming.Please explain.

2011


What does runstats do in db2?

1026


What is the purpose of using commit?

1042


What is bind plan?

980


Differentiate between cs and rr isolation levels? Where do you specify them?

1025