单项选择题

Click the Exhibit button and examine the data in the EMPLOYEES and DEPARTMENTS tables.
You want to retrieve all employees, whether or not they have matching departments in the departments table. Which query would you use?()

A.SELECT last_name, department_name FROM employees NATURAL JOIN departments;
B.SELECT last_name, department_name FROM employees JOIN departments ;
C.SELECT last_name, department_name FROM employees e JOIN departments d ON (e.department_id = d.department_id);
D.SELECT last_name, department_name FROM employees e RIGHT OUTER JOIN departments d ON (e.department_id = d.department_id); 
E.SELECT last_name, department_name FROM employees FULL JOIN departments ON (e.department_id = d.department_id);
F.SELECT last_name, department_name FROM employees e LEFT OUTER JOIN departments d ON (e.department_id = d.department_id);


您可能感兴趣的试卷

你可能感兴趣的试题

1.单项选择题Which view should a user query to display the columns associated with the constraints on a table owned by the user?()

A.USER_CONSTRAINTS
B.USER_OBJECTS
C.ALL_CONSTRAINTS
D.USER_CONS_COLUMNS
E.USER_COLUMNS

2.单项选择题

Examine the description of the EMPLOYEES table:
EMP_ID NUMBER(4) NOT NULL
LAST_NAME VARCHAR2(30) NOT NULL
FIRST_NAME VARCHAR2(30)
DEPT_ID NUMBER(2)
Which statement produces the number of different departments that have employees with last name Smith?()

A.SELECT COUNT(*) FROM employees WHERE last_name='Smith';
B.SELECT COUNT(dept_id) FROM employees WHERE last_name='Smith';
C.SELECT DISTINCT(COUNT(dept_id)) FROM employees WHERE last_name='Smith';
D.SELECT COUNT(DISTINCT dept_id) FROM employees WHERE last_name='Smith';
E.SELECT UNIQUE(dept_id) FROM employees WHERE last_name='Smith';

3.多项选择题Which three statements about subqueries are true? ()

A.A single row subquery can retrieve only one column and one row.
B.A single row subquery can retrieve only one row but many columns.
C.A multiple row subquery can retrieve multiple rows and multiple columns.
D.A multiple row subquery can be compared using the ">" operator.
E.A single row subquery can use the IN operator.
F.A multiple row subquery can use the "=" operator.

4.单项选择题

Click the Exhibit button and examine the data in the EMPLOYEES table.
On the EMPLOYEES table, EMPLOYEE_ID is the primary key. MGR_ID is the ID of managers and refers to the EMPLOYEE_ID. The JOB_ID column is a NOT NULL column.
Evaluate this DELETE statement:
DELETE employee_id, salary, job_id
FROM employees
WHERE dept_id = 90;
Why does the DELETE statement fail when you execute it?()

A.There is no row with dept_id 90 in the EMPLOYEES table.
B.You cannot delete the JOB_ID column because it is a NOT NULL column.
C.You cannot specify column names in the DELETE clause of the DELETE statement.
D.You cannot delete the EMPLOYEE_ID column because it is the primary key of the table.

5.多项选择题

Examine the description of the STUDENTS table:
STD_ID NUMBER(4)
COURSE_ID VARCHAR2(10)
START_DATE DATE
END_DATE DATE
Which two aggregate functions are valid on the START_DATE column? ()

A.SUM(start_date)
B.AVG(start_date)
C.COUNT(start_date)
D.AVG(start_date, end_date)
E.MIN(start_date)
F.MAXIMUM(start_date)

6.单项选择题

Examine the description of the MARKS table:
STD_ID NUMBER(4)
STUDENT_NAME VARCHAR2(30)
SUBJ1 NUMBER(3)
SUBJ2 NUMBER(3)
SUBJ1 and SUBJ2 indicate the marks obtained by a student in two subjects.
Examine this SELECT statement based on the MARKS table:
SELECT subj1+subj2 total_marks, std_id
FROM marks
WHERE subj1 > AVG(subj1) AND subj2 > AVG(subj2)
ORDER BY total_marks;
What is the result of the SELECT statement?()

A.The statement executes successfully and returns the student ID and sum of all marks for each student who obtained more than the average mark in each subject.
B.The statement returns an error at the SELECT clause.
C.The statement returns an error at the WHERE clause.
D.The statement returns an error at the ORDER BY clause.

8.单项选择题

The EMP table contains these columns:
LAST_NAME VARCHAR2 (25)
SALARY NUMBER (6,2)
DEPARTMENT_ID NUMBER (6)
You need to display the employees who have not been assigned to any department. You write the SELECT statement:
SELECT LAST_NAME, SALARY, DEPARTMENT_ID
FROM EMP
WHERE DEPARTMENT_ID = NULL;
What is true about this SQL statement ?()

A.The SQL statement displays the desired results.
B.The column in the WHERE clause should be changed to display the desired results.
C.The operator in the WHERE clause should be changed to display the desired results.
D.The WHERE clause should be changed to use an outer join to display the desired results.

9.多项选择题In which three cases would you use the USING clause?()

A.You want to create a nonequijoin.
B.The tables to be joined have multiple NULL columns.
C.The tables to be joined have columns of the same name and different data types.
D.The tables to be joined have columns with the same name and compatible data types.
E.You want to use a NATURAL join, but you want to restrict the number of columns in the join condition.

10.多项选择题Which two tasks can you perform using only the TO_CHAR function? ()

A.convert 10 to 'TEN'
B.convert '10' to 10
C.convert 10 to '10'
D.convert 'TEN' to 10
E.convert a date to a character expression
F.convert a character expression to a date

最新试题

Evaluate the SQL statement: TRUNCATE TABLE DEPT; Which three are true about the SQL statement? ()

题型:多项选择题

Examine the structure of the STUDENTS table:STUDENT_ID NUMBER NOT NULL, Primary KeySTUDENT_NAME VARCHAR2(30)COURSE_ID VARCHAR2(10) NOT NULLMARKS NUMBERSTART_DATE DATEFINISH_DATE DATEYou need to create a report of the 10 students who achieved the highest ranking in the course INT SQL and who completed the course in the year 1999.Which SQL statement accomplishes this task? ()

题型:单项选择题

Which one is a system privilege? ()

题型:单项选择题

Which two statements about subqueries are true? ()

题型:多项选择题

User Mary has a view called EMP_DEPT_LOC_VU that was created based on the EMPLOYEES, DEPARTMENTS, and LOCATIONS tables. She has the privilege to create a public synonym, and would like to create a synonym for this view that can be used by all users of the database. Which SQL statement can Mary use to accomplish that task?()

题型:单项选择题

Evaluate these two SQL statements: SELECT last_name, salary, hire_dateFROM EMPLOYEES ORDRE BY salary DESC; SELECT last_name, salary, hire_dateFROM EMPOLYEES ORDER BY 2 DESC; What is true about them? ()

题型:单项选择题

Which three are true? ()

题型:多项选择题

What is true about sequences? ()

题型:单项选择题

Which SQL statement displays the date March 19, 2001 in a format that appears as "Nineteenth of March 2001 12:00:00 AM"? ()

题型:单项选择题

Which two statements are true about constraints? ()

题型:多项选择题