joins1

1
--To print the names, salaries of all the CLERKs who work in the RESEARCH dept --(from TBL_EMP,TBL_DEPT,TBL_JOB): SELECT ENAME,SAL FROM TBL_EMP,TBL_DEPT,TBL_JOB WHERE TBL_EMP.DEPTNO = TBL_DEPT.DEPTNO -- join of TBL_EMP and TBL_DEPT AND TBL_EMP.JOBID = TBL_JOB.JOBID -- join of TBL_EMP and TBL_JOB AND DESIGNATION = 'CLERK' AND DNAME = 'RESEARCH';

Upload: subhadeep-das

Post on 07-Apr-2016

212 views

Category:

Documents


0 download

DESCRIPTION

joins

TRANSCRIPT

Page 1: Joins1

--To print the names, salaries of all the CLERKs who work in the RESEARCH dept--(from TBL_EMP,TBL_DEPT,TBL_JOB):

SELECT ENAME,SAL FROM TBL_EMP,TBL_DEPT,TBL_JOBWHERE TBL_EMP.DEPTNO = TBL_DEPT.DEPTNO -- join of TBL_EMP and TBL_DEPTAND TBL_EMP.JOBID = TBL_JOB.JOBID -- join of TBL_EMP and TBL_JOBAND DESIGNATION = 'CLERK'AND DNAME = 'RESEARCH';