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

wht is d/f b/w inner join and outer join ? d/f group by and order by having by ?

2 Answers  


Define declaration generator (dclgen).

0 Answers  


What do the initials DDL and DML stand for and what is their meaning?

2 Answers  


If I have a view which is a join of two or more tables, can this view be updatable?

3 Answers  


What is tablespace?

3 Answers  


How do you simulate the EXPLAIN of an embedded SQL statement in SPUFI/QMF? Give an example with a host variable in WHERE clause)

2 Answers  


wht r the requirements for writing a cobol-db2 pgm ?

4 Answers   IBM,


what's the error code for Unique Index Violation?

2 Answers  


What is the STOSPACE Utility used for?

1 Answers  


Mention the way of highlighting as well as putting a cursor to use in a cobol program.

0 Answers  


What is a cursor and what is its function?

2 Answers  


Suppose I have a program which uses a dynamic SQL and it has been performing well till now. Off late, I find that the performance has deteriorated. What happened?

1 Answers  


Categories