单项选择题You need to create a view EMP_VU. The view should allow the users to manipulate 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;


您可能感兴趣的试卷

你可能感兴趣的试题

2.单项选择题

Examine the description of the EMPLOYEES table:

Which statement shows the department ID, minimum salary, and maximum salary paid in that department, only of the minimum salary is less then 5000 and the 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;

3.单项选择题

Evaluate this SQL statement:
SELECT e.employee_id, (.15* e.salary) + (.5 * e.commission_pct) + (s.sales amount * (.35 * e.bonus)) AS CALC_VALUE
FROM employees e, sales s
WHERE e.employee_id = s.emp_id;
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.

4.单项选择题

The CUSTOMERS table has these columns:
CUSTOMER_ID NUMBER(4) NOT NULL
CUSTOMER_NAME VARCHAR2(100) NOT NULL
STREET_ADDRESS VARCHAR2(150)
CITY_ADDRESS VARCHAR2(50)
STATE_ADDRESS VARCHAR2(50)
PROVINCE_ADDRESS VARCHAR2(50)
COUNTRY_ADDRESS VARCHAR2(50)
POSTAL_CODE VARCHAR2(12)
CUSTOMER_PHONE VARCHAR2(20)
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 WHER 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;

6.单项选择题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, 'YYYY') 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;

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.

9.单项选择题

The EMP table has these columns:
ENAME VARCHAR2(35)
SALARY NUMBER(8,2)
HIRE_DATE DATE
Management wants a list of names of employees who have been with the company for more than five years.
Which SQL statement displays the required results?()

A. SELECT ENAME FROM EMP WHERE SYSDATE-HIRE_DATE >5;
B. SELECT ENAME FROM EMP WHERE HIRE_DATE-SYSDATE >5;
C. SELECT ENAME FROM EMP WHERE (SYSDATE_HIRE_DATE)/365 >5;
D. SELECT ENAME FROM EMP WHERE (SYSDATE_HIRE_DATE)*/365 >5;

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

最新试题

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

题型:单项选择题

Examine the statement: Create synonym emp for hr. employees; What happens when you issue the statement? ()

题型:单项选择题

Which constraint can be defined only at the column level? ()

题型:单项选择题

You need to design a student registration database that contains several tables storing academic information.The STUDENTS table stores information about a student. The STUDENT_GRADES table storesinformation about the student's grades. Both of the tables have a column named STUDENT_ID. The STUDENT_ID column in the STUDENTS table is a primary key.You need to create a foreign key on the STUDENT_ID column of the STUDENT_GRADES table thatpoints to the STUDENT_ID column of the STUDENTS table. Which statement creates the foreign key?()

题型:单项选择题

Which four are types of functions available in SQL? ()

题型:多项选择题

Examine these statements:CREATE ROLE registrarGRANT UPDATE ON dtudent_grades TO registrar;GRANT registrar to user1, user2, user3;What does this set of SQL statements do? ()

题型:单项选择题

What is true regarding subqueries?()

题型:单项选择题

Which statement accomplish this? ()

题型:单项选择题

Which one is a system privilege? ()

题型:单项选择题

Which object privileges can be granted on a view? ()

题型:单项选择题