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?

Answers were Sorted based on User's Feedback



In a single table,How to retrieve a employee-id of an employee who works in more than one departme..

Answer / venkat

SELECT EMPLOYEE-ID FROM EMPLOYEE GROUP BY EMPLOYEE-ID,DEPARTMENT HAVING COUNT( DEPARTMENT ) > 1;

Is This Answer Correct ?    0 Yes 2 No

In a single table,How to retrieve a employee-id of an employee who works in more than one departme..

Answer / karthik

select dept,empid , count(*)
from table
goup by dept,empid
having count(*) > 1

Is This Answer Correct ?    0 Yes 3 No

In a single table,How to retrieve a employee-id of an employee who works in more than one departme..

Answer / g.kameswara reddy

select employee_id from employee table where department in
('a1','a2','b1','b2');

Is This Answer Correct ?    7 Yes 11 No

In a single table,How to retrieve a employee-id of an employee who works in more than one departme..

Answer / prasenjit_in

Select emp_id from employee where dept IN (select all
dept from employee);

Is This Answer Correct ?    4 Yes 9 No

In a single table,How to retrieve a employee-id of an employee who works in more than one departme..

Answer / ab

Select emp_id from employee where dept IN (select DISTINCT
dept from employee);

Is This Answer Correct ?    2 Yes 8 No

Post New Answer

More DB2 Interview Questions

What is a lock?

1 Answers  


What is package versioning? Please give an example.

1 Answers  


List out the data types available.

0 Answers  


What is the logical entity between plan and Package?

5 Answers  


What is the significance of the CURSOR WITH HOLD clause in a cursor declaration?

4 Answers  


How could one combine a set of incremental image copies into a single copy?

1 Answers  


What is the difference between cursor and select statement?

0 Answers  


What are the disadvantages of using VARCHAR?

3 Answers  


What is multi row fetch in db2?

0 Answers  


Which catalog tables contain authorization information?

1 Answers  


What is a synonym ?

2 Answers  


What is the role of union all and union

0 Answers  


Categories