多项选择题

The ORDERS table has these columns:

The ORDERS table tracks the Order number, the order total, and the customer to whom the Order belongs. Which two statements retrieve orders with an inclusive total that ranges between 100.00 and 2000.00 dollars?()

A. SELECT customer_id, order_id, order_total   FROM orders   RANGE ON order_total (100 AND 2000) INCLUSIVE;
B. SELECT customer_id, order_id, order_total   FROM orders   HAVING order_total BETWEEN 100 and 2000;
C. SELECT customer_id, order_id, order_total   FROM orders   WHERE order_total BETWEEN 100 and 2000;
D. SELECT customer_id, order_id, order_total   FROM orders   WHERE order_total >= 100 and <= 2000;
E.  SELECT customer_id, order_id, order_total   FROM orders   WHERE order_total >= 100 and order_total <= 2000;


您可能感兴趣的试卷

你可能感兴趣的试题

1.单项选择题

Examine the data from the ORDERS and CUSTOMERS tables.
ORDERS
ORD_ID ORD_DATE CUST_ID
12-JAN-
100 15 10000
09-MAR-
101 40 8000
09-MAR-
102 35 12500
15-MAR-
103 15 12000
25-JUN-
104 15 6000
18-JUL-
105 20 5000
106 18-JUL- 35 7000
21-JUL-
107 20 6500
04-AUG-
109 10 8000
CUSTOMERS
CUST_ID CUST_NAME CITY
10 Smith Los Angeles
15 Bob San Francisco
20 Martin Chicago
25 Mary New York
30 Rina Chicago
35 Smith New York
40 Lind New York
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. ORD_ID ORD_DATE CUST_ID ORD_TOTAL 09-MAR- 102 35 12500 18-JUL- 106 35 7000 04-AUG- 108 10 8000
B. ORD_ID ORD_DATE CUST_ID ORD_TOTAL 09-MAR- 102 35 12500 18-JUL- 106 35 7000
C. ORD_ID ORD_DATE CUST_ID ORD_TOTAL 04-AUG- 108 10 8000
D. The query fails because the subquery returns more than one row.
E. The query fails because the outer query and the inner query are using different tables.

2.单项选择题

Examine the structure of the EMPLOYEES, DEPARTMENTS, and TAX tables.
EMPLOYEES
NOT NULL, Primary
EMPLOYEE_ID NUMBER
Key
VARCHAR2
EMP_NAME
(30)
VARCHAR2
JOB_ID
(20)
SALARY NUMBER
References
MGR_ID NUMBER
EMPLOYEE_ID
column
DEPARTMENT_ID NUMBER Foreign key to
DEPARTMENT_ID
column of
the DEPARTMENTS
table
DEPARTMENTS
NOT NULL,
DEPARTMENT_ID NUMBER
Primary Key
VARCHAR2
DEPARTMENT_NAME
|30|
References
MGR_ID column
MGR_ID NUMBER
of the
EMPLOYEES table
TAX
MIN_SALARY NUMBER
MAX_SALARY NUMBER
TAX_PERCENT NUMBER
For which situation would you use a nonequijoin query?()

A. To find the tax percentage for each of the employees.
B. To list the name, job id, and manager name for all the employees.
C. To find the name, salary, and department name of employees who are not working with Smith.
D. To find the number of employees working for the Administrative department and earning less then 4000.
E. To display name, salary, manager ID, and department name of all the employees, even if the employees do not have a department ID assigned.

3.单项选择题

The STUDENT_GRADES table has these columns:

The register has requested a report listing the students' grade point averages (GPA), sorted from highest grade point average to lowest within each semester, starting from the earliest date. Which statement accomplishes this?()

A. SELECT student_id, semester_end, gpa   FROM student_grades   ORDER BY semester_end DESC, gpa DESC;
B. SELECT student_id, semester_end, gpa   FROM student_grades   ORDER BY semester_end ASC, gpa ASC;
C. SELECT student_id, semester_end, gpa   FROM student_grades   ORDER BY semester_end, gpa DESC;
D. SELECT student_id, semester_end, gpa   FROM student_grades   ORDER BY gpa DESC, semester_end DESC;
E. SELECT student_id, semester_end, gpa   FROM student_grades   ORDER BY gpa DESC, semester_end ASC;

4.单项选择题Which operator can be used with a multiple-row subquery?()

A. =
B. LIKE
C. BETWEEN
D. NOT IN
E. IS
F. <>

5.单项选择题

Examine the structure of the EMPLOYEES table:
Column name Data type Remarks
EMPLOYEE_ID NUMBER NOT NULL, Primary Key
LAST_NAME VARCNAR2(30)
FIRST_NAME VARCNAR2(30)
JOB_ID NUMBER
SAL NUMBER
MGR_ID NUMBER References EMPLOYEE_ID column
DEPARTMENT_ID NUMBER
You need to create an index called NAME_IDX on the first name and last name fields of the EMPLOYEES table. Which SQL statement would you use to perform this task?()

A. CREATE INDEX NAME _IDX (first_name, last_name);
B. CREATE INDEX NAME _IDX (first_name, AND last_name)
C. CREATE INDEX NAME_IDX ON (First_name, last_name);
D. CREATE INDEX NAME_IDX ON employees (First_name, AND last_name);
E. CREATE INDEX NAME_IDX ON employees (First_name, last_name);
F. CREATE INDEX NAME_IDX FOR employees (First_name, last_name);

6.多项选择题Which four are correct guidelines for naming database tables? ()

A. Must begin with either a number or a letter.
B. Must be 1-30 characters long.
C. Should not be an Oracle Server reserved word.
D. Must contain only A-Z, a-z, 0-+, _, *, and #.
E. Must contain only A-Z, a-z, 0-9, _, $, and #.
F. Must begin with a letter.

7.多项选择题Which two statements about sequences are true? ()

A. You use a NEXTVAL pseudo column to look at the next possible value that would be generated from a sequence, without actually retrieving the value.
B. You use a CURRVAL pseudo column to look at the current value just generated from a sequence, without affecting the further values to be generated from the sequence.
C. You use a NEXTVAL pseudo column to obtain the next possible value from a sequence by actually retrieving the value from the sequence.
D. You use a CURRVAL pseudo column to generate a value from a sequence that would be used for a specified database column.
E. If a sequence starting from a value 100 and incremented by 1 is used by more then one application, then all of these applications could have a value of 105 assigned to their column whose value is being generated by the sequence.
F. You use REUSE clause when creating a sequence to restart the sequence once it generates the maximum value defined for the sequence.

8.单项选择题

Examine the structure of the EMPLOYEES table:
EMPLOYEE_ID NUMBER NOT NULL
EMP_NAME VARCHAR2(30)
JOB_ID VARCHAR2(20) DEFAULT 'SA_REP'
SAL NUMBER
COMM_PCT NUMBER
MGR_ID NUMBER
DEPARTMENT_ID NUMBER
You need to update the records of employees 103 and 115. The UPDATE statement you specify should update the rows with the values specified below:
JOB_ID: Default value specified for this column definition.
SAL: Maximum salary earned for the job ID SA_REP.
COMM_PCT: Default value specified for this commission percentage column, if any. If no default value is specified for the column, the value should be NULL. DEPARTMENT_ID: Supplied by the user during run time through substitution variable.
Which UPDATE statement meets the requirements?()

A. UPDATE employees SET job_id = DEFAULT AND Sal = (SELECT MAX(sal) FROM employees WHERE job_id = 'SA_REP') AND comm_pct = DEFAULT AND department_id = &did WHERE employee _id IN (103,115);
B. UPDATE employees SET job_id = DEFAULT AND Sal = MAX(sal) AND comm_pct = DEFAULT OR NULL AND department_id = &did WHERE employee_id IN (103,115) AND job _ id = 'SA_ REP';
C. UPDATE employees SET job_id = DEFAULT, Sal = (SELECT MAX(sal) FROM employees WHERE job_id = 'SA_REP'), comm_pct = DEFAULT, department_id = &did WHERE employee_id IN (103,115);
D. UPDATE employees SET job_id = DEFAULT, Sal = MAX(sal), comm_pct = DEFAULT, department_id = &did WHERE employee_id IN (103,115) AND job _ id = 'SA_ REP';
E. UPDATE employees SET job_id = DEFAULT, Sal = (SELECT MAX(sal) FROM employees WHERE job_id = 'SA_REP') comm_pct = DEFAULT OR NULL, department_id = &did WHERE employee_id IN (103,115);

9.多项选择题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 by using the ">" operator.
E. A single row subquery can use the IN operator.
F. A multiple row subquery can use the "=" operator.

10.单项选择题In a SELECT statement that includes a WHERE clause, where is the GROUP BY clause placed in the SELECT statement?()

A. Immediately after the SELECT clause
B. Before the WHERE clause
C. Before the FROM clause
D. After the ORDER BY clause
E. After the WHERE clause