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?

Answers were Sorted based on User's Feedback



Q1.all the depts which has more then 10 empls? Q2.all the dept which does not have any emply? Q3 a..

Answer / ramkiran

select emp.deptno,emp.ename,dept.deptno,dept.dname from
emp,dept
where emp.deptno(+) = dept.deptno
order by 1

Is This Answer Correct ?    3 Yes 0 No

Q1.all the depts which has more then 10 empls? Q2.all the dept which does not have any emply? Q3 a..

Answer / 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

More SQL PLSQL Interview Questions

What is a nested table in word?

0 Answers  


using comand prompt how can import table data and table space with example

2 Answers  


Mention what does plvtab enables you to do when you showthe contents of pl/sql tables?

0 Answers  


What are the string functions in sql?

0 Answers  


Difference between a query and strored procedure?

4 Answers   Microsoft,






How do you optimize a query?

0 Answers  


What are the different ddl commands in sql?

0 Answers  


What are the 3 types of behavioral triggers?

0 Answers  


Are dml statements autocommit?

0 Answers  


How do I restart sql?

0 Answers  


What are Nested Tables? How will u delete 5 rows from Nested Tables

3 Answers   IBM,


What does count (*) mean?

0 Answers  


Categories