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


Please Help Members By Posting Answers For Below Questions

What are the types of join in sql?

518


What is the difference between the conventional and direct path loader? : aql loader

648


How you improve the performance of sql*loader? : aql loader

574


Is it possible to pass parameters to triggers?

571


how is exception handling handled in mysql? : Sql dba

549






How do I run a sql query in pgadmin 4?

546


What is substitution variable in pl sql?

500


What is mutating error in pl sql?

544


What are the benefits of triggers?

595


What is record data type?

512


Determine if oracle date is on a weekend?

552


What is java sql driver?

542


How to process query result in pl/sql?

558


define sql insert statement ? : Sql dba

547


How do I delete a trigger?

541