多项选择题Which two statements about views are true?()

A. A view can be created as read only.
B. A view can be created as a join on two or more tables.
C. A view cannot have an ORDER BY clause in the SELECT statement.
D. A view cannot be created with a GROUP BY clause in the SELECT statement.
E. A view must have aliases defined for the column names in the SELECT statement.


您可能感兴趣的试卷

你可能感兴趣的试题

1.单项选择题

The database administrator of your company created a public synonym called HR for the HUMAN_RESOURCES table of the GENERAL schema, because many users frequently use this table. As a user of the database, you created a table called HR in your schema.
What happens when you execute this query?()

A. You obtain the results retrieved from the public synonym HR created by the database administrator.
B. You obtain the results retrieved from the HR table that belongs to your schema.
C. You get an error message because you cannot retrieve from a table that has the same name as a public synonym.
D. You obtain the results retrieved from both the public synonym HR and the HR table that belongs to your schema, as a Cartesian product.
E. You obtain the results retrieved from both the public synonym HR and the HR table that belongs to your schema, as a FULL JOIN.

2.多项选择题

Examine the data in the EMPLOYEES table:
LAST_NAME DEPARTMENT_ID SALARY
Getz 10 3000
Davis 20 1500
Bill 20 2200
Davis 30 5000
...
Which three subqueries work? ()

A. SELECT * FROM employees where salary > (SELECT MIN(salary) FROM employees GROUP BY department _ id);
B. SELECT * FROM employees WHERE salary = (SELECT AVG(salary) FROM employees GROUP BY department _ id);
C. SELECT distinct department_id FROM employees Where salary > ANY (SELECT AVG(salary) FROM employees GROUP BY department _ id);
D. SELECT department_id FROM employees WHERE SALARY > ALL (SELECT AVG(salary) FROM employees GROUP BY department _ id);
E. SELECT last_name FROM employees Where salary > ANY (SELECT MAX(salary) FROM employees GROUP BY department _ id);
F. SELECT department_id FROM employees WHERE salary > ALL (SELECT AVG(salary) FROM employees GROUP BY ANG (SALARY));

3.单项选择题You need to give the MANAGER role the ability to select from, insert into, and modify existing rows in the STUDENT_GRADES table. Anyone given this MANAGER role should be able to pass those privileges on to others.Which statement accomplishes this?()

A.GRANT select, insert, update ON student_grades TO manager
B.GRANT select, insert, update ON student_grades TO ROLE manager
C.GRANT select, insert, modify ON student_grades TO manager WITH GRANT OPTION;
D.GRANT select, insert, update ON student_grades TO manager WITH GRANT OPTION;
E.GRANT select, insert, update ON student_grades TO ROLE manager WITH GRANT OPTION;
F.GRANT select, insert, modify ON student_grades TO ROLE manager WITH GRANT OPTION;

5.多项选择题

Examine the structure of the EMPLOYEES table:
EMPLOYEE_ID NUMBER Primary Key
FIRST_NAME VARCHAR2(25)
LAST_NAME VARCHAR2(25)
Which three statements inserts a row into the table? ()

A. INSERT INTO employees VALUES (NULL, 'JOHN','Smith');
B. INSERT INTO employees( first_name, last_name) VALUES ('JOHN','Smith');
C. INSERT INTO employees VALUES ('1000','JOHN','NULL');
D. INSERT INTO employees(first_name,last_name, employee_id) VALUES ('1000, 'john','Smith');
E. INSERT INTO employees (employee_id) VALUES (1000);
F. INSERT INTO employees (employee_id, first_name, last_name) VALUES ( 1000, 'john',");

6.单项选择题

Examine the data in the EMPLOYEES and DEPARTMENTS tables.
EMPLOYEES
LAST_NAME DEPARTMENT_ID SALARY
Getz 10 3000
Davis 20 1500
Bill 20 2200
Davis 30 5000
Kochhar 5000
DEPARTMENTS
DEPARTMENT_ID DEPARTMENT_NAME
10 Sales
20 Marketing
30 Accounts
40 Administration
You want to retrieve all employees, whether or not they have matching departments in the departments table.
Which query would you use?()

A. SELECT last_name, department_name FROM employees , departments(+);
B. SELECT last_name, department_name FROM employees JOIN departments(+);
C. SELECT last_name, department_name ON (e. department_ id = d. departments_id); FROM employees(+) e JOIN departments d
D. SELECT last_name, department_name FROM employees e RIGHT OUTER JOIN departments d ON (e.department_id = d.department_id);
E. SELECT last_name, department_name FROM employees(+) , departments ON (e. department _ id = d. department _id);
F. SELECT last_name, department_name FROM employees e LEFT OUTER JOIN departments d ON (e. department _ id = d. department _id);

7.单项选择题

You need to give the MANAGER role the ability to select from, insert into, and modify existing rows in the STUDENT_GRADES table. Anyone given this MANAGER role should be able to pass those privileges on to others.
Which statement accomplishes this?()

A. GRANT select, insert, update   ON student_grades   TO manager;
B. GRANT select, insert, update   ON student_grades   TO ROLE manager;
C. GRANT select, insert, modify   ON student_grades   TO manager   WITH GRANT OPTION;
D. GRANT select, insert, update   ON student_grades   TO manager   WITH GRANT OPTION;
E. GRANT select, insert, update   ON student_grades   TO ROLE manager   WITH GRANT OPTION;
F. GRANT select, insert, modify   ON student_grades   TO ROLE manager   WITH GRANT OPTION;

8.多项选择题Which three statements inserts a row into the table?()

A. INSERT INTO employees   VALUES ( NULL, ‘John’,‘Smith’);
B. INSERT INTO employees( first_name, last_name)   VALUES(‘John’,‘Smith’);
C. INSERT INTO employees   VALUES (‘1000’,‘John’,NULL);
D. INSERT INTO employees(first_name,last_name, employee_id)   VALUES ( 1000, ‘John’,‘Smith’);
E. INSERT INTO employees (employee_id)   VALUES (1000);
F. INSERT INTO employees (employee_id, first_name, last_name)   VALUES ( 1000, ‘John’,‘’);

10.单项选择题In which scenario would an index be most useful?()

A.The indexed column is declared as NOT NULL.
B.The indexed columns are used in the FROM clause.
C.The indexed columns are part of an expression.
D.The indexed column contains a wide range of values.