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

Answer Posted / venkat

select emp-id from emp group by emp-id having count(*)>1;

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is innodb buffer pool?

564


What is the role of schema in the db2 database?

653


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

613


What is the purpose of using commit?

618


What is the difference between bind and rebind in db2?

858






What is a bind card?

681


Define sqlca.

651


DB2 can implement a join in three ways using a merge join, a nested join or a hybrid join. Explain the differences?

2282


Mention the downsides of page level lock.

711


Explain how can you do the explain of a dynamic sql statement?

654


What is the maximum length of sqlca?

869


On which levels locks can be applied?

661


How can deadlocks be resolved?

544


What is sqlca?

625


What are packages in db2?

599