站内搜索
1Z0-007 问题列表
问题
多选题When should you create a role?()ATo simplify the process of creating new users using the CREATE USER xxx IDENTIFIED by yyy statement.BTo grant a group of relate privileges to a user.CWhen the number of people using the database is very high.DTo simplify the process of granting and revoking privileges.ETo simplify profile maintenance for a user who is constantly traveling.
问题
单选题Examine the structure of the STUDENTS table: STUDENT_ID NUMBER NOT NULL, Primary Key STUDENT_NAME VARCHAR2(30) COURSE_ID VARCHAR2(10) NOT NULL MARKS NUMBER START_DATE DATE FINISH_DATE DATE You need to create a report of the 10 students who achieved the highest ranking in the course INT SQL and who completed the course in the year 1999. Which SQL statement accomplishes this task?()A
SELECT student_ id, marks, ROWNUM Rank FROM students WHERE ROWNUM = 10 AND finish_date BETWEEN '01-JAN-99' AND '31-DEC-99' AND course_id = 'INT_SQL' ORDER BY marks DESC;B
SELECT student_id, marks, ROWID Rank FROM students WHERE ROWID = 10 AND finish_date BETWEEN '01-JAN-99' AND '31-DEC-99' AND course_id = 'INT_SQL' ORDER BY marks;C
SELECT student_id, marks, ROWNUM Rank FROM (SELECT student_id, marks FROM students WHERE ROWNUM = 10 AND finish_date BETWEEN '01-JAN-99' AND '31-DEC-99' AND course_id = 'INT_SQL' ORDER BY marks DESC);D
SELECT student_id, marks, ROWNUM Rank FROM (SELECT student_id, marks FROM students ORDER BY marks DESC) WHERE ROWNUM = 10 AND finish_date BETWEEN '01-JAN-99' AND '31-DEC-99' AND course _ id ='INT _ SQL';
问题
单选题Examine the structure of the EMPLOYEES table: EMPLOYEE_ID NUMBER NOT NULL EMP_NAME VARCHAR2(30) JOB_ID VARCHAR2(20) DEFAULT 'SA_REP' SAL NUMBER COMM_PCT NUMBER MGR_ID NUMBER DEPARTMENT_ID NUMBER You need to update the records of employees 103 and 115. The UPDATE statement you specify should update the rows with the values specified below: JOB_ID: Default value specified for this column definition. SAL: Maximum salary earned for the job ID SA_REP. COMM_PCT: Default value specified for this commission percentage column, if any. If no default value is specified for the column, the value should be NULL. DEPARTMENT_ID: Supplied by the user during run time through substitution variable. Which UPDATE statement meets the requirements?()A
UPDATE employees SET job_id = DEFAULT AND Sal = (SELECT MAX(sal) FROM employees WHERE job_id = 'SA_REP') AND comm_pct = DEFAULT AND department_id = did WHERE employee _id IN (103,115);B
UPDATE employees SET job_id = DEFAULT AND Sal = MAX(sal) AND comm_pct = DEFAULT OR NULL AND department_id = did WHERE employee_id IN (103,115) AND job _ id = 'SA_ REP';C
UPDATE employees SET job_id = DEFAULT, Sal = (SELECT MAX(sal) FROM employees WHERE job_id = 'SA_REP'), comm_pct = DEFAULT, department_id = did WHERE employee_id IN (103,115);D
UPDATE employees SET job_id = DEFAULT, Sal = MAX(sal), comm_pct = DEFAULT, department_id = did WHERE employee_id IN (103,115) AND job _ id = 'SA_ REP';E
UPDATE employees SET job_id = DEFAULT, Sal = (SELECT MAX(sal) FROM employees WHERE job_id = 'SA_REP') comm_pct = DEFAULT OR NULL, department_id = did WHERE employee_id IN (103,115);
问题
单选题Examine the structure of the STUDENTS table: STUDENT_ID NUMBER NOT NULL, Primary Key STUDENT_NAME VARCHAR2(30) COURSE_ID VARCHAR2(10) NOT NULL MARKS NUMBER START_DATE DATE FINISH_DATE DATE You need to create a report of the 10 students who achieved the highest ranking in the course INT SQL and who completed the course in the year 1999. Which SQL statement accomplishes this task?()A
SELECT student_ id, marks, ROWNUM Rank FROM students WHERE ROWNUM = 10 AND finish_date BETWEEN '01-JAN-99' AND '31-DEC-99 AND course_id = 'INT_SQL' ORDER BY mark DESC;B
SELECT student_id, marks, ROWID Rank FROM students WHERE ROWID = 10 AND finish_date BETWEEN '01-JAN-99' AND '31-DEC-99' AND course_id = 'INT_SQL' ORDER BY mark;C
SELECT student_id, marks, ROWNUM Rank FROM (SELECT student_id, marks FROM students WHERE ROWNUM = 10 AND finish_date BETWEEN '01-JAN-99' AND '31-DEC- 99' AND course_id = 'INT_SQL' ORDER BY mark DESC;D
SELECT student_id, marks, ROWNUM Rank FROM (SELECT student_id, marks FROM students WHERE (finish_date BETWEEN '01-JAN-99 AND '31-DEC-99' AND course_id = 'INT_SQL' ORDER BY marks DESC) WHERE ROWNUM = 10;E
SELECT student id, marks, ROWNUM Rank FROM (SELECT student_id, marks FROM students ORDER BY marks) WHERE ROWNUM = 10 AND finish date BETWEEN '01-JAN-99' AND '31-DEC-99' AND course _ id 'INT_SQL';
问题
单选题Evaluate the SQL statement: SELECT ROUND(45.953, -1), TRUNC(45.936, 2) FROM dual; Which values are displayed?()A
46 and 45B
46 and 45.93C
50 and 45.93D
50 and 45.9E
45 and 45.93F
45.95 and 45.93
问题
单选题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? SELECT * FROM HR; ()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.
问题
单选题The EMPLOYEES table contains these columns: EMPLOYEE_ID NUMBER(4) LAST_NAME VARCHAR2 (25) JOB_ID VARCHAR2(10) You want to search for strings that contain 'SA_' in the JOB_ID column. Which SQL statement do you use?()A
SELECT employee_id, last_name, job_id FROM employees WHERE job_id LIKE '%SA/_%' ESCAPE '/';B
SELECT employee_id, last_name, job_id FROM employees WHERE job_id LIKE '%SA_';C
SELECT employee_id, last_name, job_id FROM employees WHERE job_id LIKE '%SA_' ESCAPE /;D
SELECT employee_id, last_name, job_id FROM employees WHERE job_id = '%SA_';
问题
单选题You need to calculate the total of all salaries in the accounting department. Which group function should you use?()A
MAXB
MINC
SUMD
COUNTE
TOTALF
LARGEST
问题
单选题You need to create a table named ORDERS that contains four columns: 1.an ORDER_ID column of number data type 2.a CUSTOMER_ID column of number data type 3.an ORDER_STATUS column that contains a character data type 4.a DATE_ORDERED column to contain the date the order was placed When a row is inserted into the table, if no value is provided for the status of the order, the value PENDING should be used instead. Which statement accomplishes this?()A
CREATE TABLE orders ( order_id NUMBER(10), customer_id NUMBER(8), order_status NUMBER(10) DEFAULT 'PENDING', date_ordered DATE );B
CREATE TABLE orders ( order_id NUMBER(10), customer_id NUMBER(8), order_status VARCHAR2(10) = 'PENDING', date_ordered DATE );C
CREATE OR REPLACE TABLE orders ( order_id NUMBER(10), customer_id NUMBER(8), order_status VARCHAR2(10) DEFAULT 'PENDING', date_ordered DATE );D
CREATE OR REPLACE TABLE orders ( order_id NUMBER(10), customer_id NUMBER(8), order_status VARCHAR2(10) = 'PENDING', date_ordered DATE );E
CREATE TABLE orders ( order_id NUMBER(10), customer_id NUMBER(8), order_status VARCHAR2(10) DEFAULT 'PENDING', date_ordered DATE );F
CREATE TABLE orders ( order_id NUMBER(10), customer_id NUMBER(8), order_status VARCHAR2(10) DEFAULT 'PENDING', date_ordered VARCHAR2 );
问题
单选题Examine the structure of the EMPLOYEES table: EMPLOYEE_ID NUMBER Primary Key FIRST_NAME VARCHAR2(25) LAST_NAME VARCHAR2(25) DEPARTMENT_ID NUMBER SALARY NUMBER What is the correct syntax for an inline view? ()A
SELECT a.last_name, a.salary, a.department_id, b.maxsal FROM employees a, (SELECT department_id, max(salary)maxsal FROM employees GROUP BY department_id) b WHERE a.department_id = b.department_id AND a.salary b.maxsal;B
SELECT a.last name, a.salary, a.department_id FROM employees a WHERE a.department_id IN (SELECT department_id FROM employees b GROUP BY department_id having salary = (SELECT max(salary) from employees))C
SELECT a.last_name, a.salary, a.department_id FROM employees a WHERE a.salary = (SELECT max(salary) FROM employees b WHERE a.department _ id = b.department _ id);D
SELECT a.last_name, a.salary, a.department_id FROM employees a WHERE (a.department_id, a.salary) IN (SELECT department_id, a.salary) IN (SELECT department_id max(salary) FROM employees b GROUP BY department_id ORDER BY department _ id);
问题
多选题Which two statements are true regarding the ORDER BY clause? ()AThe sort is in ascending by order by default.BThe sort is in descending order by default.CThe ORDER BY clause must precede the WHERE clause.DThe ORDER BY clause is executed on the client side.EThe ORDER BY clause comes last in the SELECT statement.FThe ORDER BY clause is executed first in the query execution.
问题
单选题Which statement describes the ROWID data type? ()A
Binary data up to 4 gigabytes.B
Character data up to 4 gigabytes.C
Raw binary data of variable length up to 2 gigabytes.D
Binary data stored in an external file, up to 4 gigabytes.E
A hexadecimal string representing the unique address of a row in its table.
问题
单选题Examine the data in the EMPLOYEES and DEPARTMENTS tables: EMPLOYEES EMP_NAME DEPT_ID MGR_ID JOB_ID SALARY EMPLOYEE_ID 101 Smith 20 120 SA_REP 4000 102 Martin 10 105 CLERK 2500 103 Chris 20 120 IT_ADMIN 4200 104 John 30 108 HR_CLERK 2500 105 Diana 30 108 IT_ADMIN 5000 106 Smith 40 110 AD_ASST 3000 108 Jennifer 30 110 HR_DIR 6500 110 Bob 40 EX_DIR 8000 120 Ravi 20 110 SA*DIR 6500 DEPARTMENTS DEPARTMENT_ID DEPARTMENT_NAME 10 Admin 20 Education 30 IT 40 Human Resources Also examine the SQL statements that create the EMPLOYEES and DEPARTMENTS tables: CREATE TABLE departments (department_id NUMBER PRIMARY KEY, department _ name VARCHAR2(30)); CREATE TABLE employees (EMPLOYEE_ID NUMBER PRIMARY KEY, EMP_NAME VARCHAR2(20), DEPT_ID NUMBER REFERENCES departments(department_id), MGR_ID NUMBER REFERENCES employees(employee id), MGR_ID NUMBER REFERENCES employees(employee id), JOB_ID VARCHAR2(15). SALARY NUMBER); ON the EMPLOYEES, 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: DELETE FROM departments WHERE department id = 40; 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.
问题
单选题Which SQL statement returns a numeric value?()A
SELECT ADD_MONTHS(MAX(hire_Date), 6) FROM EMP;B
SELECT ROUND(hire_date) FROM EMP;C
SELECT sysdate-hire_date FROM EMP;D
SELECT TO_NUMBER(hire_date + 7) FROM EMP;
问题
单选题Which statement describes the ROWID data type?()A
Binary data up to 4 gigabytes.B
Character data up to 4 gigabytes.C
Raw binary data of variable length up to 2 gigabytes.D
Binary data stored in an external file, up to 4 gigabytes.E
A hexadecimal string representing the unique address of a row in its table.