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

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

Is This Answer Correct ?    0 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to find the maximum value in a column in the db2 database?

1019


Define predicate?

1069


File not opened because library is *PROD and debug is UPDPROD(*NO). ? what may be the reason? how to solve it..?

2869


Define check constraint.

1028


What is a cursor in programming?

1016


What is the use of commit in db2?

1006


What are the contents of dclgen?

1054


Explain various types of locks in db2?

1086


What is lock escalation in db2?

970


What is the difference between cursor and select statement?

1056


How do you concatenate the firstname and lastname from emp table to give a complete name?

1016


How do I import data from excel to db2?

1015


What is the difference between dbm cfg and db cfg file in db2 ?

1481


What are foreign keys in db2?

1037


Mention the different locking levels that are available in db2.

1074