单项选择题

Examine the structure of the EMPLOYEES and DEPARTMENTS tables:

Evaluate this SQL statement:

Which SQL statement is equivalent to the above SQL statement?()

A.
B.
C.
D.


您可能感兴趣的试卷

你可能感兴趣的试题

1.单项选择题

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;

2.多项选择题

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;

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

4.单项选择题

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.

6.多项选择题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;

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

8.单项选择题

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.

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

最新试题

Which two statements about subqueries are true? ()

题型:多项选择题

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

题型:单项选择题

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

题型:多项选择题

Evaluate this SQL statement:SELECT e.emp_name, d.dept_nameFROM employees eJOIN departments dUSING (department_id)WHERE d.department_id NOT IN (10,40)ORSER BY dept_name;The statement fails when executed. Which change fixes the error? ()

题型:单项选择题

Which are /SQL*Plus commands? ()

题型:多项选择题

In which two cases would you use an outer join? ()

题型:多项选择题

Which two statements about subqueries are true? ()

题型:多项选择题

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

题型:单项选择题

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

题型:单项选择题

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

题型:单项选择题