There are 2 tables:
EMP : EmpId, Ename, Sal, DeptId
DEPT : DeptId, Dname

Write a query to find out emp names and their department names. if any emp has null in Deptid the it shows
?No Department?.

Write a query to find out those department names which
has no employee.

Write a query to find out those employees whose salary
is greater than their department?s average salary.

Answer Posted / humera

Answer Q # 37
select e.ename,d.dname from emp e left outer join dept d on
e.deptid = d.deptid

Is This Answer Correct ?    1 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

write a query that returns one row for each department and the number of employees in that department. Given two tables EMPLOYEE and DEPARTMENT, where there can be multiple employees per department.

1175


Code for display the images from drive using vb 6.0?

4280


Q2. A memory location has physical address D5687h. Compute: a. The offset address if the segment number is D445h. b. The segment number if the offset address is B577h.

1625


what is the system development cycle

1261


Given an array of size n+1 which contains all the numbers from 1 to n.Find the number which is repeated in O(n) time.How do you proceed with the same with floating numbers from 0 to 1 instead of 1 to n?

604






My Qualification is MCA.My interview is on 5th may.They may ask q as------AS u r MCA...Why u r not tring anywhere else? What can be the ans?

1489


Please describe an example where you used object orientation in one of your programs.

1489


what is the diff bw sql direct and jdbc update can't we do select and updating operation in sql direct

1676


if 3 duplicate records, by keeping one original and one duplicate record, and how to delete remaining 2 duplicates in sql server 2008

1593


How will you prove that java swing is multithreaded?

1694


why not instantiating servet using new operator?

1491


How to merge Action Form with Dyna Action Form in Struts.

1894


why we use mantis? what u mean mantis in IT trends? addvantages of mantis?

1738


Bonjour, svp je veut voir comment envoyer un mail en java et comment changer le droit d'accé d'un fichier en java: de lecture en lecture/écriture et merci d'avance ;)

1762


Given a Binary Search Tree, write a program to print the kth smallest element without using any static/global variable. You can?t pass the value k to any function also.

552