Question
Create TWO scripts, one using: a) traditional join with the WHERE clause AND another one using: b) ANSI join with the JOIN keyword Q5 An
Create TWO scripts, one using: a) traditional join with the WHERE clause AND another one using: b) ANSI join with the JOIN keyword
Q5
An EMPLOYEES table was added to the JustLee Books database to track employee information. Display a list of each employees name, job title, and managers name. Use column aliases to clearly identify employee and manager name values. Include all employees in the list and sort by manager name.
Employees Table:
CREATE TABLE JL_Employees ( EMPNO NUMBER(4), LNAME VARCHAR2(20), FNAME VARCHAR2(15), JOB VARCHAR2(9), HIREDATE DATE, DEPTNO NUMBER(2) NOT NULL, MTHSAL NUMBER(7,2), BONUS NUMBER(6,2), MGR NUMBER(4), CONSTRAINT jl_employees_empno_PK PRIMARY KEY (EMPNO)); INSERT INTO JL_employees VALUES (7839,'KING','BEN', 'GTECH2',TO_DATE('17-NOV-1991','DD-MON-YYYY'),10,6000,3000,NULL); INSERT INTO JL_employees VALUES (8888,'JONES','LARRY','MTech2',TO_DATE('17-NOV-1998','DD-MON-YYYY'),10,4200,1200,7839); INSERT INTO JL_employees VALUES (7344,'SMITH','SAM','GTech1',TO_DATE('17-NOV-1995','DD-MON-YYYY'),20,4900,1500,7839); INSERT INTO JL_employees VALUES (7355,'POTTS','JIM','GTech1',TO_DATE('17-NOV-1995','DD-MON-YYYY'),20,4900,1900,7839); INSERT INTO JL_employees VALUES (8844,'STUART','SUE','MTech1',TO_DATE('17-NOV-1998','DD-MON-YYYY'),10,3700,NULL,8888);
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started