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

select employee_id,department_id from emp where employee_id in(select employee_id from emp where department_id in (select distinct
department_id from emp) group by employee_id,department_id having count(*) >1);

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to rename a table in DB2 ?

1055


What is a page in db2?

1006


What is alias in db2?

1013


Explain about rct in db2?

1067


Is it possible using max on a char column?

1105


What is db2 and what is the use of db2 optimizer?

1019


How can the firstname and the lastname from the emp table be concatenated to generate complete names?

1246


In an sql table that is embedded, what is the procedure to retrieve rows that are part of a db2 table?

1065


How can you validate Sql errors during cursor operation in db2 pgms and where do you code?

2186


How is the value function used?

1105


What are the uses of db2 optimizer?

1259


What is rct?

1198


Can we delete records from view?

940


SQLCODE = -199, ERROR: ILLEGAL USE OF KEYWORD CHAR, TOKEN KEY was expected

11647


What is the difference between plan and package in db2?

1072