单项选择题

Click the Exhibit button and examine the data from the ORDERS and CUSTOMERS tables.
Evaluate the SQL statement:
SELECT *
FROM orders
WHERE cust_id = (SELECT cust_id
FROM customers
WHERE cust_name = 'Smith');
What is the result when the query is executed?()

A.A
B.B
C.C
D.D
E.E


您可能感兴趣的试卷

你可能感兴趣的试题

2.单项选择题Which is an iSQL*Plus command?()

A.INSERT
B.UPDATE
C.SELECT
D.DESCRIBE
E.DELETE
F.RENAME

3.单项选择题Which iSQL*Plus feature can be used to replace values in the WHERE clause?()

A.substitution variables
B.replacement variables
C.prompt variables
D.instead-of variables
E.This feature cannot be implemented through iSQL*Plus.

4.多项选择题Which four statements correctly describe functions that are available in SQL? ()

A.INSTR returns the numeric position of a named character.
B.NVL2 returns the first non-null expression in the expression list.
C.TRUNCATE rounds the column, expression, or value to n decimal places.
D.DECODE translates an expression after comparing it to each search value.
E.TRIM trims the heading or trailing characters (or both) from a character string.
F.NVL compares two expressions and returns null if they are equal, or the first expression if they are not equal.
G.NULLIF compares two expressions and returns null if they are equal, or the first expression if they are not equal.

5.单项选择题

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)
JOB_CAT VARCHAR2(30)
SALARY NUMBER(8,2)
Which statement shows the department ID, minimum salary, and maximum salary paid in that department, only if the minimum salary is less than 5000 and maximum salary is more than 15000?()
 

A.SELECT dept_id, MIN(salary), MAX(salary) FROM employees WHERE MIN(salary) < 5000 AND MAX(salary) > 15000;
B.SELECT dept_id, MIN(salary), MAX(salary) FROM employees WHERE MIN(salary) < 5000 AND MAX(salary) > 15000 GROUP BY dept_id;
C.SELECT dept_id, MIN(salary), MAX(salary) FROM employees HAVING MIN(salary) < 5000 AND MAX(salary) > 15000;
D.SELECT dept_id, MIN(salary), MAX(salary) FROM employees GROUP BY dept_id HAVING MIN(salary) < 5000 AND MAX(salary) > 15000;
E.SELECT dept_id, MIN(salary), MAX(salary) FROM employees GROUP BY dept_id, salary HAVING MIN(salary) < 5000 AND MAX(salary) > 15000;

6.多项选择题Which are DML statements? ()

A.COMMIT
B.MERGE
C.UPDATE
D.DELETE
E.CREATE
F.DROP...

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

8.单项选择题You need to change the definition of an existing table. The COMMERCIALS table needs its DESCRIPTION column changed to hold varying length characters up to 1000 bytes. The column can currently hold 500 bytes per value. The table contains 20000 rows. Which statement is valid?()

A.ALTER TABLE commercials MODIFY (description CHAR2(1000));
B.ALTER TABLE commercials CHANGE (description CHAR2(1000));
C.ALTER TABLE commercials CHANGE (description VARCHAR2(1000));
D.ALTER TABLE commercials MODIFY (description VARCHAR2(1000));
E.You cannot increase the size of a column if the table has rows.

9.单项选择题You need to modify the STUDENTS table to add a primary key on the STUDENT_ID column. The table is currently empty. Which statement accomplishes this task?()

A.ALTER TABLE students ADD PRIMARY KEY student_id;
B.ALTER TABLE students ADD CONSTRAINT PRIMARY KEY (student_id);
C.ALTER TABLE students ADD CONSTRAINT stud_id_pk PRIMARY KEY student_id;
D.ALTER TABLE students ADD CONSTRAINT stud_id_pk PRIMARY KEY (student_id);
E.ALTER TABLE students MODIFY CONSTRAINT stud_id_pk PRIMARY KEY (student_id);

10.多项选择题Which two statements about subqueries are true? ()

A.A subquery should retrieve only one row.
B.A subquery can retrieve zero or more rows.
C.A subquery can be used only in SQL query statements.
D.Subqueries CANNOT be nested by more than two levels.
E.A subquery CANNOT be used in an SQL query statement that uses group functions.
F.When a subquery is used with an inequality comparison operator in the outer SQL statement, the column list in the SELECT clause of the subquery should contain only one column.

最新试题

What is true about sequences? ()

题型:单项选择题

Evaluate this SQL statement:SELECT e.emp_name, d.dept_nameFROM employees eJOIN departments dUSING (department_id)WHERE d.department_id NOT IN (10,40)ORSER BY dept_name;The statement fails when executed. Which change fixes the error? ()

题型:单项选择题

Which is an iSQL*Plus command? ()

题型:单项选择题

Examine the structure of the EMPLOYEES table: EMPLOYEE_ID NUMBER Primary KeyFIRST_NAME VARCHAR2(25)LAST_NAME VARCHAR2(25)HIRE_DATE DATEWhich INSERT statement is valid? ()

题型:单项选择题

You need to perform these tasks:1. Create and assign a MANAGER role to Blake and Clark2. Grant CREATE TABLE and CREATE VIEW privileges to Blake and ClarkWhich set of SQL statements achieves the desired results? ()

题型:单项选择题

Which two are true about aggregate functions?()

题型:多项选择题

Which one is a system privilege? ()

题型:单项选择题

Which two statements about subqueries are true? ()

题型:多项选择题

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? ()

题型:单项选择题

The PRODUCTS table has these columns:PRODUCT_ID NUMBER(4)PRODUCT_NAME VARCHAR2(45)PRICE NUMBER(8,2)Evaluate this SQL statement:SELECT *FROM PRODUCTSORDER BY price, product _ name;What is true about the SQL statement? ()

题型:单项选择题