单项选择题

Click the Exhibit button and examine the data in the EMPLOYEES table.
Examine the subquery:
SELECT last_name
FROM employees
WHERE salary IN (SELECT MAX(salary)
FROM employees
GROUP BY department_id);
Which statement is true?()

A.The SELECT statement is syntactically accurate.
B.The SELECT statement does not work because there is no HAVING clause.
C.The SELECT statement does not work because the column specified in the GROUP BY clause is not in the SELECT list.
D.The SELECT statement does not work because the GROUP BY clause should be in the main query and not in the subquery.


您可能感兴趣的试卷

你可能感兴趣的试题

1.多项选择题Which two are character manipulation functions? ()

A.TRIM
B.REPLACE
C.TRUNC
D.TO_DATE
E.MOD
F.CASE

2.多项选择题Which two are attributes of iSQL*Plus? ()

A.iSQL*Plus commands cannot be abbreviated.
B.iSQL*Plus commands are accessed from a browser.
C.iSQL*Plus commands are used to manipulate data in tables.
D.iSQL*Plus commands manipulate table definitions in the database.
E.iSQL*Plus is the Oracle proprietary interface for executing SQL statements.

3.单项选择题In which case would you use a FULL OUTER JOIN?()

A.Both tables have NULL values.
B.You want all unmatched data from one table.
C.You want all matched data from both tables.
D.You want all unmatched data from both tables.
E.One of the tables has more data than the other.
F.You want all matched and unmatched data from only one table.

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

A.Asinglerowsubquerycanretrieveonlyonecolumnandonerow.
B.Asinglerowsubquerycanretrieveonlyonerowbutmanycolumns.
C.Amultiplerowsubquerycanretrievemultiplerowsandmultiplecolumns.
D.Amultiplerowsubquerycanbecomparedusingthe";>;";operator.
E.AsinglerowsubquerycanusetheINoperator.
F.Amultiplerowsubquerycanusethe";=";operator.

5.单项选择题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

6.多项选择题

Evaluate the SQL statement
DROP TABLE DEPT;
Which four statements are true of the SQL statement? ()

A.You cannot roll back this statement.
B.All pending transactions are committed.
C.All views based on the DEPT table are deleted.
D.All indexes based on the DEPT table are dropped.
E.All data in the table is deleted, and the table structure is also deleted.
F.All data in the table is deleted, but the structure of the table is retained.
G.All synonyms based on the DEPT table are deleted.

7.单项选择题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

8.单项选择题Which clause should you use to exclude group results?()

A.WHERE
B.HAVING
C.RESTRICT
D.GROUP BY
E.ORDER BY

9.多项选择题Which two statements are true about constraints? ()

A.The UNIQUE constraint does not permit a null value for the column.
B.A UNIQUE index gets created for columns with PRIMARY KEY and UNIQUE constraints.
C.The PRIMARY KEY and FOREIGN KEY constraints create a UNIQUE index.
D.The NOT NULL constraint ensures that null values are not permitted for the column.

10.单项选择题The EMPLOYEES table has these columns:LAST_NAME VARCHAR2(35) SALARY NUMBER(8,2) HIRE_DATE DATEManagement wants to add a default value to the SALARY column. You plan to alter the table by using this SQL statement:ALTER TABLE EMPLOYEES MODIFY (SALARY DEFAULT 5000);Which is true about your ALTER statement?()

A.Column definitions cannot be altered to add DEFAULT values.
B.A change to the DEFAULT value affects only subsequent insertions to the table.
C.Column definitions cannot be altered to add DEFAULT values for columns with a NUMBER data type.
D.All the rows that have a NULL value for the SALARY column will be updated with the value 5000.