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 db2 package?

0 Answers  


How do I import data from excel to db2?

0 Answers  


What is explain in db2?

0 Answers  


What do you mean by storage group (stogroup)?

0 Answers  


Bind concepts in DB2 cobol

10 Answers   IBM, TCS, TRD, Virtusa,


One program calling 5 subprograms, its a cobol db2 program, after precompilation how many plans and packages will created?

3 Answers  


Following a db2 update statement, what is the quickest way to compute the total number of updated rows?

0 Answers  


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

3 Answers  


How to know the primary key of a table without defining the primary key in the table?

5 Answers   Satyam,


Can we declare DB2 HOST variable in COBOL COPY book?

2 Answers  


Request to database but database is not available so what is was abend is raised?

2 Answers   UST,


Define db2 and its databases?

0 Answers  


Categories