View
247
Download
0
Category
Preview:
Citation preview
7/24/2019 lablsql
1/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 from deptloc group bydeptno 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;
Recommended