1Z0-007 题目列表
单选题Which SELECT statement should you use to extract the year from the system date and display it in the format "1998"? ()ASELECT TO_CHAR(SYSDATE,'yyyy') FROM dual;BSELECT TO_DATE(SYSDATE,'yyyy') FROM dual;CSELECT DECODE(SUBSTR(SYSDATE, 8), 'YYYY') FROM dual;DSELECT DECODE(SUBSTR(SYSDATE, 8), 'year') FROM dual;ESELECT TO_CHAR(SUBSTR(SYSDATE, 8,2),'yyyy') FROM dual;

单选题What is necessary for your query on an existing view to execute successfully?()AThe underlying tables must have data.BYou need SELECT privileges on the view.CThe underlying tables must be in the same schema.DYou need SELECT privileges only on the underlying tables.

单选题In which scenario would an index be most useful?()AThe indexed column is declared as NOT NULL.BThe indexed columns are used in the FROM clause.CThe indexed columns are part of an expression.DThe indexed column contains a wide range of values.

多选题Examine the data in the EMPLOYEES table: LAST_NAME DEPARTMENT_ID SALARY Getz 10 3000 Davis 20 1500 Bill 20 2200 Davis 30 5000 ... Which three subqueries work? ()ASELECT * FROM employees where salary (SELECT MIN(salary) FROM employees GROUP BY department _ id);BSELECT * FROM employees WHERE salary = (SELECT AVG(salary) FROM employees GROUP BY department _ id);CSELECT distinct department_id FROM employees Where salary ANY (SELECT AVG(salary) FROM employees GROUP BY department _ id);DSELECT department_id FROM employees WHERE SALARY ALL (SELECT AVG(salary) FROM employees GROUP BY department _ id);ESELECT last_name FROM employees Where salary ANY (SELECT MAX(salary) FROM employees GROUP BY department _ id);FSELECT department_id FROM employees WHERE salary ALL (SELECT AVG(salary) FROM employees GROUP BY ANG (SALARY));

单选题Which SQL statement accepts user input for the columns to be displayed, the table name, and WHERE condition? ()ASELECT 1, 2 FROM 3 WHERE last_name = '8';BSELECT 1, '2' FROM 3 WHERE ' last_name = '8';CSELECT 1, 2 FROM 3 WHERE last_name = '8';DSELECT 1, '2' FROM EMP WHERE last_name = '8';

单选题A SELECT statement can be used to perform these three functions: 1. Choose rows from a table. 2. Choose columns from a table 3. Bring together data that is stored in different tables by creating a link between them. Which set of keywords describes these capabilities? ()Adifference, projection, joinBselection, projection, joinCselection, intersection, joinDintersection, projection, joinEdifference, projection, product

单选题Evaluate the SQL statement: 1 SELECT a.emp_name, a.sal, a.dept_id, b.maxsal 2 FROM employees a, 3 (SELECT dept_id, MAX(sal) maxsal 4. FROM employees 5 GROUP BY dept_id) b 6 WHERE a.dept_id = b.dept_id 7 AND a. asl b. maxsal; What is the result of the statement? ()AThe statement produces an error at line 1.BThe statement produces an error at line 3.CThe statement produces an error at line 6.DThe statement returns the employee name, salary, department ID, and maximum salary earned in the department of the employee for all departments that pay less salary then the maximum salary paid in the company.EThe statement returns the employee name, salary, department ID, and maximum salary earned in the department of the employee for all employees who earn less than the maximum salary in their department.

多选题For which two actions can you use the TO_DATE function? ()Aconvert any date literal to a dateBconvert any numeric literal to a dateCconvert any date to a character literalDformat 'January 10 1999' for inputEformat '10-JAN-99' to 'January 10 1999'

单选题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?()AUPDATE 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);BUPDATE 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';CUPDATE employeesC.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);DUPDATE employeesD.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';EUPDATE 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 EMPLOYEES table: EMPLOYEE_ID NUMBER Primary Key FIRST_NAME VARCHAR2(25) LAST_NAME VARCHAR2(25) Which three statements inserts a row into the table? ()AINSERT INTO employees VALUES (NULL, 'JOHN','Smith');BINSERT INTO employees( first_name, last_name) VALUES ('JOHN','Smith');CINSERT INTO employees VALUES ('1000','JOHN','NULL');DINSERT INTO employees(first_name,last_name, employee_id) VALUES ('1000, 'john','Smith');EINSERT INTO employees (employee_id) VALUES (1000);FINSERT INTO employees (employee_id, first_name, last_name) VALUES ( 1000, 'john',);

单选题You need to perform certain data manipulation operations through a view called EMP_DEPT_VU, which you previously created. You want to look at the definition of the view (the SELECT statement on which the view was created.) How do you obtain the definition of the view?()AUse the DESCRIBE command on the EMP_DEPT_VU view.BUse the DEFINE VIEW command on the EMP_DEPT_VU view.CUse the DESCRIBE VIEW command on the EMP_DEPT_VU view.DQuery the USER_VIEWS data dictionary view to search for the EMP_DEPT_VU view.EQuery the USER_SOURCE data dictionary view to search for the EMP_DEPT_VU view.FQuery the USER_OBJECTS data dictionary view to search for the EMP_DEPT_VU view.

多选题Which three statements correctly describe the functions and use of constraints? ()AConstraints provide data independence.BConstraints make complex queries easy.CConstraints enforce rules at the view level.DConstraints enforce rules at the table level.EConstraints prevent the deletion of a table if there are dependencies.FConstraints prevent the deletion of an index if there are dependencies.

单选题The EMPLOYEE tables has these columns: LAST_NAME VARCHAR2(35) SALARY NUMBER(8,2) COMMISSION_PCT NUMBER(5,2) You want to display the name and annual salary multiplied by the commission_pct for all employees. For records that have a NULL commission_pct, a zero must be displayed against the calculated column. Which SQL statement displays the desired results? ()ASELECT last_name, (salary * 12) * commission_pct FROM EMPLOYEES;BSELECT last_name, (salary * 12) * IFNULL(commission_pct, 0) FROM EMPLOYEES;CSELECT last_name, (salary * 12) * NVL2(commission_pct, 0) FROM EMPLOYEES;DSELECT last_name, (salary * 12) * NVL(commission_pct, 0) FROM EMPLOYEES;

单选题You need to change the definition of an existing table. The COMMERCIALS table needs its DESCRIPTION column changed to hold varying length characters up to 2000 bytes. The column can currently hold 1000 bytes per value. The table contains 20000 rows. Which statement is valid?()AALTER TABLE commercials MODIFY (description CHAR2(2000));BALTER TABLE commercials CHANGE (description CHAR2(2000));CALTER TABLE commercials CHANGE (description VARCHAR2 (2000));DALTER TABLE commercials MODIFY (description VARCHAR2 (2000));EYou cannot increase the size of a column if the table has rows.

单选题Which operator can be used with a multiple-row subquery? ()A=BLIKECBETWEENDNOT INEISF