多项选择题

From SQL*Plus, you issue this SELECT statement:

You use this statement to retrieve data from a data table for()。

A. Updating
B. Viewing
C. Deleting
D. Inserting
E. Truncating


您可能感兴趣的试卷

你可能感兴趣的试题

1.单项选择题

EMPLOYEES and DEPARTMENTS data:
EMPLOYEES
DEMP_NAME DEPT_ID MGR_ID JOB_ID SALARY
EMPLOYEE_I
101 Smith 20 120 SA_REP 4000
102 Martin 10 105 CLERK 2500
103 Chris 20 120 IT_ADMIN 4200
104 John 30 108 HR_CLERK 2500
105 Diana 30 108 IT_ADMIN 5000
106 Smith 40 110 AD_ASST 3000
108 Jennifer 30 110 HR_DIR 6500
110 Bob 40 EX_DIR 8000
120 Ravi 20 110 SA_DIR 6500
DEPARTMENTS
DEPARTMENT_ID DEPARTMENT_NAME
10 Admin
20 Education
30 IT
40 Human Resources
On the EMPLOYEES table, EMPLOYEE_ID is the primary key. MGR_ID is the ID managers and refers to the EMPLOYEE_ID.
On the DEPARTMENTS table DEPARTMENT_ID is the primary key.
Evaluate this UPDATE statement.
UPDATE employees
SET mgr_id =
(SELECT mgr_id
FROM employees
WHERE dept_id=
(SELECT department_id
FROM departments
WHERE department_name = 'Administration')),
Salary = (SELECT salary
FROM employees
WHERE emp_name = 'Smith')
WHERE job_id = 'IT_ADMIN';
What happens when the statement is executed?()

A. The statement executes successfully, leaves the manager ID as the existing value, and changes the salary to 4000 for the employees with ID 103 and 105.
B. The statement executes successfully, changes the manager ID to NULL, and changes the salary to 4000 for the employees with ID 103 and 105.
C. The statement executes successfully, changes the manager ID to NULL, and changes the salary to 3000 for the employees with ID 103 and 105.
D. The statement fails because there is more than one row matching the employee name Smith.
E. The statement fails because there is more than one row matching the IT_ADMIN job ID in the EMPLOYEES table.
F. The statement fails because there is no 'Administration' department in the DEPARTMENTS table.

2.单项选择题

Evaluate this SQL statement:

What will happen if you remove all the parentheses from the calculation?()

A. The value displayed in the CALC_VALUE column will be lower.
B. The value displayed in the CALC_VALUE column will be higher.
C. There will be no difference in the value displayed in the CALC_VALUE column.
D. An error will be reported.

3.多项选择题Which two statements are true about WHERE and HAVING clauses? ()

A. A WHERE clause can be used to restrict both rows and groups.
B. A WHERE clause can be used to restrict rows only.
C. A HAVING clause can be used to restrict both rows and groups.
D. A HAVING clause can be used to restrict groups only.
E. A WHERE clause CANNOT be used in a query of the query uses a HAVING clause.
F. A HAVING clause CANNOT be used in subqueries.

4.单项选择题Which SELECT statement will the result ‘ello World’ from the string ‘Hello World’?()

A. SELECT SUBSTR( ‘Hello World’,1) FROM dual;
B. SELECT INITCAP(TRIM (‘Hello World’, 1,1)) FROM dual;
C. SELECT LOWER(SUBSTR(‘Hello World’, 1, 1) FROM dual;
D. SELECT LOWER(SUBSTR(‘Hello World’, 2, 1) FROM dual;
E. SELECT LOWER(TRIM (‘H’ FROM ‘Hello World’)) FROM dual;

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

A. Constraint names must start with SYS_C
B. All constraints must be defines at the column level
C. Constraints can be created after the table is created
D. Constraints can be created at the same time the table is created
E. Information about constraints is found in the VIEW_CONSTRAINTS dictionary view

6.单项选择题

The CUSTOMERS table has these columns:

Which statement finds the rows in the CUSTOMERS table that do not have a postal code?()

A. SELECT customer_id, customer_name   FROM customers   WHERE postal_code CONTAINS NULL;
B. SELECT customer_id, customer_name   FROM customers   WHERE postal_code = '________';
C. SELECT customer_id, customer_name   FROM customers   WHERE postal_code IS NULL;
D. SELECT customer_id, customer_name   FROM customers   WHERE postal code IS NVL;
E. SELECT customer_id, customer_name   FROM customers   WHERE postal_code = NULL;

7.单项选择题You are granted the CREATE VIEW privilege. What does this allow you to do?()

A. Create a table view.
B. Create a view in any schema.
C. Create a view in your schema.
D. Create a sequence view in any schema.
E. Create a view that is accessible by everyone.
F. Create a view only of it is based on tables that you created.

8.多项选择题

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.

9.单项选择题You would like to display the system date in the format "Monday, 01 June, 2001".Which SELECT statement should you use?()

A. SELECT TO_DATE(SYSDATE, 'FMDAY, DD Month, YYYY')   FROM dual;
B. SELECT TO_CHAR(SYSDATE, 'FMDD, DY Month, 'YYY')   FROM dual;
C. SELECT TO_CHAR(SYSDATE, 'FMDay, DD Month, YYYY')   FROM dual;
D. SELECT TO_CHAR(SYSDATE, 'FMDY, DDD Month, YYYY')   FROM dual;
E. SELECT TO_DATE(SYSDATE, 'FMDY, DDD Month, YYYY')   FROM dual;

10.单项选择题Which statement describes the ROWID data type?()

A. Binary data up to 4 gigabytes.
B. Character data up to 4 gigabytes.
C. Raw binary data of variable length up to 2 gigabytes.
D. Binary data stored in an external file, up to 4 gigabytes.
E. A hexadecimal string representing the unique address of a row in its table.