单项选择题

Evaluate the set of SQL statements:
CREATE TABLE dept
(deptno NUMBER(2),
dname VARCHAR2(14),
loc VARCHAR2(13));
ROLLBACK;
DESCRIBE DEPT
What is true about the set?()

A.The DESCRIBE DEPT statement displays the structure of the DEPT table.
B.The ROLLBACK statement frees the storage space occupied by the DEPT table.
C.The DESCRIBE DEPT statement returns an error ORA-04043: object DEPT does not exist.
D.The DESCRIBE DEPT statement displays the structure of the DEPT table only if there is a COMMIT statement introduced before the ROLLBACK statement.


您可能感兴趣的试卷

你可能感兴趣的试题

1.单项选择题

Examine the structure of the EMPLOYEES and DEPARTMENTS tables:
EMPLOYEES
EMPLOYEE_ID NUMBER
DEPARTMENT_ID NUMBER
MANAGER_ID NUMBER
LAST_NAME VARCHAR2(25)
DEPARTMENTS
DEPARTMENT_ID NUMBER
MANAGER_ID NUMBER
DEPARTMENT_NAME VARCHAR2(35)
LOCATION_ID NUMBER
You want to create a report displaying employee last names, department names, and locations. Which query should you use?()

A.SELECT e.last_name, d. department_name, d.location_id FROM employees e NATURAL JOIN departments D USING department_id ;
B.SELECT last_name, department_name, location_id FROM employees NATURAL JOIN departments WHERE e.department_id =d.department_id;
C.SELECT e.last_name, d.department_name, d.location_id FROM employees e NATURAL JOIN departments d;
D.SELECT e.last_name, d.department_name, d.location_id FROM employees e JOIN departments d USING (department_id );

2.单项选择题What is true about sequences?()

A.Once created, a sequence belongs to a specific schema.
B.Once created, a sequence is linked to a specific table.
C.Once created, a sequence is automatically available to all users.
D.Only the DBA can control which sequence is used by a certain table.
E.Once created, a sequence is automatically used in all INSERT and UPDATE statements.

3.多项选择题Which two are true about aggregate functions? ()

A.You can use aggregate functions in any clause of a SELECT statement.
B.You can use aggregate functions only in the column list of the SELECT clause and in the WHERE clause of a SELECT statement.
C.You can mix single row columns with aggregate functions in the column list of a SELECT statement by grouping on the single row columns.
D.You can pass column names, expressions, constants, or functions as parameters to an aggregate function.
E.You can use aggregate functions on a table, only by grouping the whole table as one single group.
F.You cannot group the rows of a table by more than one column while using aggregate functions.

5.单项选择题

The EMPLOYEES table contains these columns:
EMPLOYEE_ID NUMBER(4)
LAST_NAME VARCHAR2 (25)
JOB_ID VARCHAR2(10)
You want to search for strings that contain 'SA_' in the JOB_ID column. Which SQL statement do you use?()

A.SELECT employee_id, last_name, job_id FROM employees WHERE job_id LIKE '%SA\_%' ESCAPE '\';
B.SELECT employee_id, last_name, job_id FROM employees WHERE job_id LIKE '%SA_';
C.SELECT employee_id, last_name, job_id FROM employees WHERE job_id LIKE '%SA_' ESCAPE "\";
D.SELECT employee_id, last_name, job_id FROM employees WHERE job_id = '%SA_';

6.单项选择题

Evaluate this SQL statement:
SELECT e.EMPLOYEE_ID,e.LAST_NAME,e.DEPARTMENT_ID, d.DEPARTMENT_NAME
FROM EMPLOYEES e, DEPARTMENTS d
WHERE e.DEPARTMENT_ID = d.DEPARTMENT_ID;
In the statement, which capabilities of a SELECT statement are performed?()

A.selection, projection, join
B.difference, projection, join
C.selection, intersection, join
D.intersection, projection, join
E.difference, projection, product

7.单项选择题

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

A.The two statements produce identical results.
B.The second statement returns a syntax error.
C.There is no need to specify DESC because the results are sorted in descending order by default.
D.The two statements can be made to produce identical results by adding a column alias for the salary column in the second SQL statement.

8.多项选择题What are two reasons to create synonyms? ()

A.You have too many tables.
B.Your tables are too long.
C.Your tables have difficult names.
D.You want to work on your own tables.
E.You want to use another schema's tables.
F.You have too many columns in your tables.

9.单项选择题What is necessary for your query on an existing view to execute successfully?()

A.The underlying tables must have data.
B.You need SELECT privileges on the view.
C.The underlying tables must be in the same schema.
D.You need SELECT privileges only on the underlying tables.

10.单项选择题You need to create a view EMP_VU. The view should allow the users tomanipulate the records of only the employees that are working for departments 10 or 20. Which SQL statement would you use to create the view EMP_VU?()

A.CREATE VIEW emp_vu AS SELECT * FROM employees WHERE department_id IN (10,20);
B.CREATE VIEW emp_vu AS SELECT * FROM employees WHERE department_id IN (10,20) WITH READ ONLY;
C.CREATE VIEW emp_vu AS SELECT * FROM employees WHERE department_id IN (10,20) WITH CHECK OPTION;
D.CREATE FORCE VIEW emp_vu AS SELECT * FROM employees WHERE department_id IN (10,20);
E.CREATE FORCE VIEW emp_vu AS SELECT * FROM employees WHERE department_id IN (10,20) NO UPDATE;