how to get the no employee in each department including the
dept which has 0 employee
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / shailesh
select d.department_id,count(e.employee_id) from
departments d
left outer join employees e
on(e.department_id=d.department_id)
group by d.department_id;
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / sanjay pradhan
select d.deptno,count(ename)employees from emp e,dept d
where d.deptno = e.deptno(+)
group by d.deptno
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / sudipta santra
select distinct dept_no, nvl(count(emp_no),0) from dept
group by dept_no;
| Is This Answer Correct ? | 0 Yes | 3 No |
Answer / priti
select count(emp_id) from employee group by dept_id;
| Is This Answer Correct ? | 0 Yes | 3 No |
How to find the date and time of last updated table?
How to open a cursor variable?
How to create an oracle database manually?
What a SELECT FOR UPDATE cursor represent.?
How can we force the database to use the user specified rollback segment?
What are the uses of Rollback Segment ?
What is define in oracle?
Hi how Can I Add A Foreign key that references a table that has composit primary key ? example i had costumer table that has C_Id and SSN Both as PK and another table has C_Id that must refernece C_Id in Customers i done the usual way and got oracle error message about uniqeness any ideas plz
How can we view last record added to a table?
What is oracle sid?
Describe the types of sub query?
Hi can anyone tell me where are the dumps found of OCA certification.. Also the materials to be studied for the preparation.