|
|

Oracle 1z0-001: Ineroduction to oracle:sql and pl/sql
|
#1. Click on the EXHIBIT button and examine the table instance chart for the cars table. Which SELECT statement will display style, color, and lot number for all cars based on the model entered at the prompt, regardless of case?
|
|
#2. Click on the EXHIBIT button and examine the table instance chart for the patient table. You need to create the patient_id_seq sequence to be used with the patient table’s primary key column. The sequence should begin at 1000, have a maximum value of 999999999, never reuse any numbers, and increment by 1. Which statement would you use to complete this task?
|
|
#3. You issue this command: CREATE SYNONYM emp FOR ed.employee;
Which task has been accomplished?
|
|
#4. Click on the EXHIBIT button and examine the structure of the DEPARTMENT and EMPLOYEE tables. Evaluate this SQL statement CREATE INDEX emp_dept_id_idx ON employee(dept_id);
Which result will the statement provide?
|
|
#5. Which should you do after each FETCH statement in a PL/SQL block?
|
|
#6. Given this executable section of a PL/SQL block: BEGIN FOR employee_record IN salary_cursor LOOP employee_id_table(employee_id) employee_record last_name; END LOOP; CLOSE salary_cursor; END;
Why does this section cause an error?
|
|
#7. The structure of the DEPT table is as follows: Name Null Type
DEPTNO NOT NULL NUMBER(2)
DNAME VARCHAR2(14)
LOC VARCHAR2(13) Examine the code: DECLARE TYPE dept_record_type IS RECORD (dno NUMBER, name VARCHAR2(20)); dept_rec dept_record_type; BEGIN SELECT deptno, dname INTO dept_rec FROM dept WHERE deptno = 10; END;
Which statement displays the name of the selected department?
|
|
#8. The EMPLOYEE table contains these columns: BONUS NUMBER(7,2)
DEPT_ID NUMBER(9) There are 10 departments and each department has at least 1 employee. Bonus values are greater than 500; not all employees receive a bonus. Evaluate this PL/SQL block: DECLARE v_bonusemployee.bonus%TYPE := 300; BEGIN UPDATE employee SET bonus = bonus + v_bonus WHERE dept_id IN (10, 20, 30); COMMIT; END;
What will be the result?
|
|
#9. Evaluate this IF statement IF v_value> 100 THEN v_new_value := 2 * v_value; ELSIF v_value > 200 THEN v_new_value = 3 * v_value; ELSIF v_value < 300 THEN v_new_value =4 * v_value; ELSE v_new_value : = 5 * v_value; END IF;
What would be assigned to V_NEW_VALUE it V_VALUE is 250?
|
|
#10. Which ALTER command would you use to reinstate a disabled primary key constraint?
|
|
|
|
gen. 0.111
|
Server date 22:49 10-03-2010
|
Developed by Zip © 2006
|
|
 |
|
|