how to get the no employee in each department including the
dept which has 0 employee

Answer Posted / mahesh madala

select d.deptno,count(ename)no_of_emps from emp e,dept d
where d.deptno = e.deptno(+)
group by d.deptno

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to display employee records who gets more salary than the average salary in the department?

594


What will be the syntax to find current date and time in format "yyyy-mm-dd"?

566


How will you identify oracle database software release?

525


How to create an oracle database?

580


15. Display the item_cost and then truncate it to the nearest hundred, ten, unit, tenth and hundredth.

1699






What is oracle host variable?

531


How to turn on or off recycle bin for the instance?

607


Explain the different normalization forms?

591


What is dual table oracle?

527


How do you increase the OS limitation for open files (LINUX and/or Solaris)?

1462


What happens if you lost a data file?

579


What privilege is needed for a user to delete rows from tables in another schema?

562


Can any one explain me when i execute below query.. select months_between('07-JUL-12','10-FEB-12') from dual; Out put:- 4.90322581 How oracle calculate?

930


If youre unsure in which script a sys or system-owned object is created, but you know its in a script from a specific directory, what UNIX command from that directory structure can you run to find your answer?

1657


What is recycle bin in Oracle?

713