Q1.all the depts which has more then 10 empls? Q2.all the
dept which does not have any emply? Q3 all the emp which
does not have any dept? Q4 get all the emply detais with
the dept details it dept is exit otherwise any emp details?
Q5 how to debugg the dynamic sql and packages?
Answer Posted / krish
1)select deptno,count(*)
from emp having count(*)=0 group by deptno;
2)select deptno,count(*)
from emp having count(*)>10 group by deptno;
3)select empname from emp where deptno is null;
4)select emp.deptno,emp.ename,dept.deptno,dept.dname
from emp,dept
where emp.deptno=dept.deptno(+);
Is This Answer Correct ? | 2 Yes | 6 No |
Post New Answer View All Answers
What is a dirty read sql?
Is primary key clustered index?
Are null values same as that of zero or a blank space?
what is the different between now() and current_date()? : Sql dba
What are the benefits of triggers?
How to write pl sql program in mysql command prompt?
how to include comments in sql statements? : Sql dba
What is a behavioral trigger?
When is a declare statement required?
Why function is used in sql?
What is sql keyword?
How many tables can a sql database have?
What is the size of partition table?
What is the largest value that can be stored in a byte data field?
How do I sort a table in sql?