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';

Joins1

Embed Size (px)

DESCRIPTION

joins

Citation preview

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';