Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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 / ramya pisharody

Ans-1:

SELECT DEPTNO, COUNT(*) FROM EMP
GROUP BY DEPTNO
HAVING COUNT(*)>10;

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 / girija shankar dash

ANS-2:

SELECT department_id,COUNT(employee_id) AS "NO. OF EMPLOYEES"
FROM employees
GROUP BY department_id
HAVING COUNT(employee_id) = 0;

DEPARTMENT_ID NO. OF EMPLOYEES
201 0
311 0

Is This Answer Correct ?    3 Yes 2 No

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

Answer / girija shankar dash

ANS-3:

SELECT employee_id , department_id
FROM employees
WHERE department_id IS NULL;

Is This Answer Correct ?    2 Yes 1 No

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

Answer / ajit

ANS - 2
select d.deptno, dname, loc
from emp e, dept d
where e.deptno(+) = d.deptno
and e.deptno is null;

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL PLSQL Interview Questions

What is on delete restrict?

0 Answers  


What is use of trigger?

0 Answers  


Can we delete column in sql?

0 Answers  


What are the differences between implicit and explicit cursors?

0 Answers  


How does a self join work?

0 Answers  


what is index? : Sql dba

0 Answers  


what are wild cards used in database for pattern matching ? : Sql dba

0 Answers  


How long it takes to learn pl sql?

0 Answers  


what is a database transaction? : Sql dba

0 Answers  


hi sql gurus, here is my question 4 u. i wanna use triggers for sending reminder mail to all users who are registered to the site. if any one knws the code plz send me ans here : chayabs3@gmail.com thnx advance

1 Answers  


What is foreign key in sql with example?

0 Answers  


What is the process of copying data from table a to table b?

0 Answers  


Categories