单项选择题

Examine the description of the EMPLOYEES table:
EMP_ID NUMBER(4) NOT NULL
LAST_NAME VARCHAR2(30) NOT NULL
FIRST_NAME VARCHAR2(30)
DEPT_ID NUMBER(2)
JOB_CAT VARCHAR2(30)
SALARY NUMBER(8,2)
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)
E. SELECT dept_id, MIN(salary), MAX(salary) FROM employees GROUP BY dept_id, salary HAVING MIN (salary) <5000 AND MAX (salary) > 15000;


您可能感兴趣的试卷

你可能感兴趣的试题

1.多项选择题

Examine the structure of the EMPLOYEES, DEPARTMENTS, and LOCATIONS tables.
EMPLOYEES
NOT NULL,
EMPLOYEE_ID NUMBER
Primary 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, Primary
DEPARTMENT_ID NUMBER
Key
VARCHAR2
DEPARTMENT_NAME
(30)
References NGR_ID
MGR_ID NUMBER
column of
the EMPLOYEES table
Foreign key to
LOCATION_ID NUMBER
LOCATION_ID
column of the
LOCATIONS table
LOCATIONS
NOT NULL, Primary
LOCATION_ID NUMBER
Key
VARCHAR2
CITY
|30)
Which two SQL statements produce the name, department name, and the city of all the employees who earn more then 10000?()

A. SELECT emp_name, department_name, city FROM employees e JOIN departments d USING (department_id) JOIN locations 1 USING (location_id) WHERE salary > 10000;
B. SELECT emp_name, department_name, city FROM employees e, departments d, locations 1 JOIN ON (e.department_id = d.department id) AND (d.location_id =1.location_id) AND salary > 10000;
C. SELECT emp_name, department_name, city FROM employees e, departments d, locations 1 WHERE salary > 10000;
D. SELECT emp_name, department_name, city FROM employees e, departments d, locations 1 WHERE e.department_id = d.department_id AND d.location_id = 1.location_id AND salary > 10000;
E. SELECT emp_name, department_name, city FROM employees e NATURAL JOIN departments, locations WHERE salary > 10000;

2.单项选择题Which data dictionary table should you query to view the object privileges granted to the user on specific columns?()

A. USER_TAB_PRIVS_MADE
B. USER_TAB_PRIVS
C. USER_COL_PRIVS_MADE
D. USER_COL_PRIVS

3.单项选择题

Evaluate the set of SQL statements:

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 occupies 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.

5.多项选择题Which three SELECT statements displays 2000 in the format "$2,000.00"? ()

A. SELECT TO CNAR(2000, '$#,###.##') FROM dual;
B. SELECT TO CNAR(2000, '$0,000.00') FROM dual;
C. SELECT TO CNAR(2000, '$9,999.00') FROM dual;
D. SELECT TO CNAR(2000, '$9,999.99') FROM dual;
E. SELECT TO CNAR(2000, '$2,000.00') FROM dual;
F. SELECT TO CNAR(2000, '$N,NNN.NN') FROM dual;

6.多项选择题For which two constraints does the Oracle Server implicitly create a unique index? ()

A. NOT NULL
B. PRIMARY KEY
C. FOREIGN KEY
D. CHECK
E. UNIQUE

7.单项选择题

You created a view called EMP_DEPT_VU that contains three columns from the EMPLOYEES and DEPARTMENTS tables:
EMPLOYEE_ID, EMPLOYEE_NAME AND DEPARTMENT_NAME.
The DEPARTMENT_ID column of the EMPLOYEES table is the foreign key to the primary key DEPARTMENT_ID column of the DEPARTMENTS table.
You want to modify the view by adding a fourth column, MANAGER_ID of NUMBER data type from the EMPLOYEES tables.
How can you accomplish this task?()

A. ALTER VIEW EMP_dept_vu (ADD manger_id NUMBER);
B. MODIFY VIEW EMP_dept_vu (ADD manger_id NUMBER);
C. ALTER VIEW emp_dept_vu AS SELECT employee_id, employee_name, department_name, manager_id FROM employee e, departments d WHERE e.department _ id = d.department_id;
D. MODIFY VIEW emp_dept_vu AS SELECT employee_id, employee_name, department_name, manager_id FROM employees e, departments d WHERE e.department _ id = d.department_id;
E. CREATE OR REPLACE VIEW emp_dept_vu AS SELECT employee_id, employee_name, department_name, manager_id FROM employees e, departments d WHERE e.department _ id = d.department_id;
F. You must remove the existing view first, and then run the CREATE VIEW command with a new column list to modify a view.

9.多项选择题Which three are DATETIME data types that can be used when specifying column definitions? ()

A. TIMESTAMP
B. INTERVAL MONTH TO DAY
C. INTERVAL DAY TO SECOND
D. INTERVAL YEAR TO MONTH
E. TIMESTAMP WITH DATABASE TIMEZONE

10.单项选择题

Examine the data in the EMPLOYEES and DEPARTMENTS tables:

Also examine the SQL statements that create the EMPLOYEES and DEPARTMENTS tables:

On the EMPLOYEES table, EMPLOYEE_ID is the primary key.
MGR_ID is the ID of managers and refers to the EMPLOYEE_ID.
DEPT_ID is foreign key to DEPARTMENT_ID column of the DEPARTMENTS table.
On the DEPARTMENTS table, DEPARTMENT_ID is the primary key.
Examine this DELETE statement:

What happens when you execute the DELETE statement?()

A. Only the row with department ID 40 is deleted in the DEPARTMENTS table.
B. The statement fails because there are child records in the EMPLOYEES table with department ID 40.
C. The row with department ID 40 is deleted in the DEPARTMENTS table. Also the rows with employee IDs 110 and 106 are deleted from the EMPLOYEES table.
D. The row with department ID 40 is deleted in the DEPARTMENTS table. Also the rows with employee IDs 106 and 110 and the employees working under employee 110 are deleted from the EMPLOYEES table.
E. The row with department ID 40 is deleted in the DEPARTMENTS table. Also all the rows in the EMPLOYEES table are deleted.
F. The statement fails because there are no columns specifies in the DELETE clause of the DELETE statement.

最新试题

You need to perform these tasks:1. Create and assign a MANAGER role to Blake and Clark2. Grant CREATE TABLE and CREATE VIEW privileges to Blake and ClarkWhich set of SQL statements achieves the desired results? ()

题型:单项选择题

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

题型:单项选择题

Which are /SQL*Plus commands? ()

题型:多项选择题

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

题型:多项选择题

Which one is a system privilege? ()

题型:单项选择题

Examine the structure of the EMPLOYEES table:EMPLOYEE_ID NUMBER NOT NULL, Primary KeyEMP_NAME VARCHAR2(30)JOB_ID NUMBER\SAL NUMBERMGR_ID NUMBER References EMPLOYEE_ID columnDEPARTMENT_ID NUMBER Foreign key to DEPARTMENT_ID column of the DEPARTMENTS table You created a sequence called EMP_ID_SEQ inorderto populate sequential values for the EMPLOYEE_ID column of the EMPLOYEES table. Which two statements regarding the EMP_ID_SEQ sequence are true? ()

题型:多项选择题

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

题型:单项选择题

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 structure of the EMPLOYEES table: EMPLOYEE_ID NUMBER Primary KeyFIRST_NAME VARCHAR2 (25)LAST_NAME VARCHAR2 (25)HIRE_DATE DATEWhich UPDATE statement is valid? ()

题型:单项选择题

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

题型:单项选择题