Answered step by step
Verified Expert Solution
Question
1 Approved Answer
6. Refer to the following tables then answer the questions that follow. EMP (Employee) table: EMPNO ENAME JOB 7934 MILLER CLERK 7782 CLARK MANAGER
6. Refer to the following tables then answer the questions that follow. EMP (Employee) table: EMPNO ENAME JOB 7934 MILLER CLERK 7782 CLARK MANAGER 7839 KING PRESIDENT 7369 SMITH CLERK 7876 ADAMS CLERK 7566 JONES MANAGER 7788 SCOTT ANALYST 7902 FORD ANALYST 7900 JAMES CLERK SALESMAN 7654 MARTIN 7521 WARD 7844 TURNER 7499 ALLEN 7698 BLAKE 7782 23-JAN-12 1300 7839 09-JUN-19 2450 17-NOV-11 5000 7902 7788 17-DEC-18 800 12-JAN-13 1100 7839 02-APR-14 2975 7566 09-DEC-18 3000 7566 03-DEC-18 3000 7698 03-DEC-18 950 7698 28-SEP-16 1250 1400 SALESMAN 7698 22-FEB-17 1250 500 SALESMAN 7698 08-SEP-12 1500 0 SALESMAN 7698 20-FEB-16 1600 300 MANAGER 7839 01-MAY-19 2850 DEPT (Department) table: DEPTNO DNAME MGR HIREDATE SAL COMM DEPTNO LOC 10 ACCOUNTING NEW YORK 20 RESEARCH DALLAS 30 SALES. CHICAGO 40 OPERATIONS BOSTON Code Sample 1 SELECT ename AS EMPLOYEE FROM emp e JOIN dept d ON sal AS SALARY , loc AS LOCATED IN e.deptno d.deptno AND loc IN ('NEW YORK', 'DALLAS') 10 10 IP 20 Explain the effect of the following changes to code sample 1: (1) Append a new line to the statement as follows ORDER BY loc, sal (ii) Replace JOIN with RIGHT JOIN 0 0 0 88- 20 22 20 20 20 30 O 0 30 - 30 O 30 Show the data that would be returned when executing the following SQL statement (code sample 1) and then briefly explain how SQL supports and processes the extraction of data from more than one table. O 30 O O 30 (8) (4)
Step by Step Solution
★★★★★
3.42 Rating (158 Votes )
There are 3 Steps involved in it
Step: 1
Code Sample 1 SELECT ename AS EMPLOYEE sal AS SALARY loc AS LOCATED IN FROM emp JOIN dept d ON edept...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