Oracle 1Z0-007

2019-03-15 14:19

Oracle 1Z0-007

Q: 1 Examine the structure of the EMPLOYEES table: EMPLOYEE_ID NUMBER Primary Key FIRST_NAME VARCHAR2(25) LAST_NAME VARCHAR2(25)

Which three statements insert a row into the table? (Choose three.) 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', ' ');

Q: 2 Evaluate the SQL statement:

SELECT ROUND(45.953, -1), TRUNC(45.936, 2) FROM dual;

Which values are displayed? A. 46 and 45 B. 46 and 45.93 C. 50 and 45.93 D. 50 and 45.9 E. 45 and 45.93 F. 45.95 and 45.93

Q: 3 Which are DML statements? (Choose all that apply.) A. COMMIT B. MERGE C. UPDATE D. DELETE E. CREATE F. DROP...

Q: 4 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. Q: 5 Evaluate this SQL statement: SELECT ename, sal, 12*sal+100 FROM emp;

The SAL column stores the monthly salary of the employee. Which change must be made to the above

syntax to calculate the annual compensation as \bonus of $100, multiplied by 12\

A. No change is required to achieve the desired results. B. SELECT ename, sal, 12*(sal+100) FROM emp;

C. SELECT ename, sal, (12*sal)+100

FROM emp;

D. SELECT ename, sal+100,*12 FROM emp;

Q: 6 Examine the SQL statement that creates ORDERS table: CREATE TABLE orders

(SER_NO NUMBER UNIQUE, ORDER_ID NUMBER,

ORDER_DATE DATE NOT NULL, STATUS VARCHAR2(10)

CHECK (status IN ('CREDIT', 'CASH')), PROD_ID NUMBER

REFERENCES PRODUCTS(PRODUCT_ID), ORD_TOTAL NUMBER,

PRIMARY KEY (order_id, order_date));

For which columns would an index be automatically created when you execute the above SQL statement? (Choose two.) A. SER_NO B. ORDER_ID C. STATUS D. PROD_ID E. ORD_TOTAL

F. composite index on ORDER_ID and ORDER_DATE Q: 7 Examine the structure of the EMP_DEPT_VU view: Column Name Type Remarks

EMPLOYEE_ID NUMBER From the EMPLOYEES table EMP_NAME VARCHAR2(30) From the EMPLOYEES table JOB_ID VARCHAR2(20) From the EMPLOYEES table SALARY NUMBER From the EMPLOYEES table

DEPARTMENT_ID NUMBER From the DEPARTMENTS table DEPT_NAME VARCHAR2(30) From the DEPARTMENTS table Which SQL statement produces an error? A. SELECT *

FROM emp_dept_vu;

B. SELECT department_id, SUM(salary) FROM emp_dept_vu

GROUP BY department_id;

C. SELECT department_id, job_id, AVG(salary) FROM emp_dept_vu

GROUP BY department_id, job_id; D. SELECT job_id, SUM(salary) FROM emp_dept_vu

WHERE department_id IN (10,20) GROUP BY job_id

HAVING SUM(salary) > 20000;

E. None of the statements produce an error; all are valid.

Q: 8 Click the Exhibit button and examine the data from the ORDERS and CUSTOMERS tables.

Evaluate this SQL statement: SELECT cust_id, ord_total FROM orders

WHERE ord_total > ANY(SELECT ord_total FROM orders

WHERE cust_id IN (SELECT cust_id FROM customers WHERE city LIKE 'New York'));

What is the result when the above query is executed? Q: 9 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

Q: 10 Click the Exhibit button and examine the data from the EMP table. The COMMISSION column shows the monthly commission earned by the employee.

Which three tasks would require subqueries or joins in order to be performed in a single step? (Choose three.)

A. deleting the records of employees who do not earn commission

B. increasing the commission of employee 3 by the average commission earned in department 20

C. finding the number of employees who do NOT earn commission and are working for department 20

D. inserting into the table a new employee 10 who works for department 20 and earns a commission that is

equal to the commission earned by employee 3

E. creating a table called COMMISSION that has the same structure and data as the columns EMP_ID and

COMMISSION of the EMP table

F. decreasing the commission by 150 for the employees who are working in department 30 and earning a commission of more than 800

Q: 11 You need to modify the STUDENTS table to add a primary key on the STUDENT_ID column. The table is currently empty. Which statement accomplishes this task? A. ALTER TABLE students

ADD PRIMARY KEY student_id; B. ALTER TABLE students

ADD CONSTRAINT PRIMARY KEY (student_id); C. ALTER TABLE students

ADD CONSTRAINT stud_id_pk PRIMARY KEY student_id; D. ALTER TABLE students

ADD CONSTRAINT stud_id_pk PRIMARY KEY (student_id); E. ALTER TABLE students

MODIFY CONSTRAINT stud_id_pk PRIMARY KEY (student_id);

Q: 12 Which three are DATETIME data types that can be used when specifying column definitions? (Choose three.) A. TIMESTAMP

B. INTERVAL MONTH TO DAY C. INTERVAL DAY TO SECOND D. INTERVAL YEAR TO MONTH

E. TIMESTAMP WITH DATABASE TIMEZONE

Q: 13 The EMPLOYEES table contains these columns: LAST_NAME VARCHAR2 (25) SALARY NUMBER (6,2)

COMMISSION_PCT NUMBER (6)

You need to write a query that will produce these results: 1. Display the salary multiplied by the commission_pct. 2. Exclude employees with a zero commission_pct.

3. Display a zero for employees with a null commission value. Evaluate the SQL statement:

SELECT LAST_NAME, SALARY*COMMISSION_PCT FROM EMPLOYEES

WHERE COMMISSION_PCT IS NOT NULL; What does the statement provide? A. all of the desired results B. two of the desired results C. one of the desired results D. an error statement

Q: 14 Evaluate the SQL statement: TRUNCATE TABLE DEPT;

Which three are true about the SQL statement? (Choose three.) A. It releases the storage space used by the table.

B. It does not release the storage space used by the table.

C. You can roll back the deletion of rows after the statement executes.

D. You can NOT roll back the deletion of rows after the statement executes.

E. An attempt to use DESCRIBE on the DEPT table after the TRUNCATE statement executes will display an error.

F. You must be the owner of the table or have DELETE ANY TABLE system privileges to truncate the DEPT table.

Q: 15 The EMP table contains these columns: EMPLOYEE_ID NUMBER(4) EMPNAME VARCHAR2 (25) SALARY NUMBER(9,2) HIRE_DATE DATE

You query the database with this SQL statement: SELECT empname,hire_date HIREDATE, salary FROM EMP

ORDER BY hire_date;

How will the results be sorted? A. randomly

B. ascending by date C. descending by date

D. ascending alphabetically E. descending alphabetically

Q: 16 Mary has a view called EMP_DEPT_LOC_VU that was created based on the EMPLOYEES, DEPARTMENTS, and LOCATIONS tables. She granted SELECT privilege to Scott


Oracle 1Z0-007.doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:医院多部门质量安全管理协调制度

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: