Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

Q.Find out all those departments that are located in more than one location.

SQL> select distinct deptname from departments where deptno in(select deptno fro
m deptloc group by
deptno having count(deptno)>1);
Q.Find the list of projects.
SQL> select pjtname from projects;
Q. Find out the list of employees working on a project.
SQL> select fn,mid,ln from employees e, wrks_on w where e.eid=w.eid;
Q. List the dependants of the employee whose employee id is 001.
SQL> select depname from dependants d where d.eid='001';

SQL> select * from employees,departments d where d.deptno=employees.deptno;

You might also like