单项选择题
Examine the structure of the EMPLOYEES and DEPARTMENTS tables:
EMPLOYEES
EMPLOYEE_ID NUMBER
DEPARTMENT_ID NUMBER
MANAGER_ID NUMBER
LAST_NAME VARCHAR2(25)
DEPARTMENTS
DEPARTMENT_ID NUMBER
MANAGER_ID NUMBER
DEPARTMENT_NAME VARCHAR2(35)
LOCATION_ID NUMBER
You want to create a report displaying employee last names, department names, and locations. Which query should you use?()
A.SELECT e.last_name, d. department_name, d.location_id FROM employees e NATURAL JOIN departments D USING department_id ;
B.SELECT last_name, department_name, location_id FROM employees NATURAL JOIN departments WHERE e.department_id =d.department_id;
C.SELECT e.last_name, d.department_name, d.location_id FROM employees e NATURAL JOIN departments d;
D.SELECT e.last_name, d.department_name, d.location_id FROM employees e JOIN departments d USING (department_id );
相关考题
-
单项选择题
The STUDENT_GRADES table has these columns: STUDENT_ID NUMBER(12) SEMESTER_END DATE GPA NUMBER(4,3) The registrar requested a report listing the students grade point averages (GPA) sorted from highest grade point average to lowest. Which statement produces a report that displays the student ID and GPA in the sorted order requested by the registrar?()
A.SELECT student_id, gpa FROM student_grades ORDER BY gpa ASC;
B.SELECT student_id, gpa FROM student_grades SORT ORDER BY gpa ASC;
C.SELECT student_id, gpa FROM student_grades SORT ORDER BY gpa;
D.SELECT student_id, gpa FROM student_grades ORDER BY gpa;
E.SELECT student_id, gpa FROM student_grades SORT ORDER BY gpa DESC;
F.SELECT student_id, gpa FROM student_grades ORDER BY gpa DESC; -
单项选择题
A SELECT statement can be used to perform these three functions: 1.Choose rows from a table. 2.Choose columns from a table. 3.Bring together data that is stored in different tables by creating a link between them. Which set of keywords describes these capabilities?()
A.difference, projection, join
B.selection, projection, join
C.selection, intersection, join
D.intersection, projection, join
E.difference, projection, product -
单项选择题
Which SQL statement generates the alias Annual Salary for the calculated column SALARY*12?()
A.SELECT ename, salary*12 'Annual Salary' FROM employees;
B.SELECT ename, salary*12 "Annual Salary" FROM employees;
C.SELECT ename, salary*12 AS Annual Salary FROM employees;
D.SELECT ename, salary*12 AS INITCAP("ANNUAL SALARY") FROM employees
