1Z0-147 Exam Questions
56 real 1Z0-147 exam questions with expert-verified answers and explanations. Page 1 of 2.
- Question #1
What can you do with the DBMS_LOB package?
- Question #2
Examine this procedure: CREATE OR REPLACE PROCEDURE ADD_PLAYER (V_ID IN NUMBER, V_LAST_NAME VARCHAR2) IS BEGIN INSERT INTO PLAYER (ID,LAST_NAME) VALUES (V_ID, V_LAST_NAME); COMMIT;...
- Question #3
This statement fails when executed: CREATE OR REPLACE TRIGGER CALC_TEAM_AVG AFTER INSERT ON PLAYER BEGIN INSERT INTO PLAYER_BAT_STAT (PLAYER_ID, SEASON_YEAR,AT_BATS,HITS) VALUES (N...
- Question #4
The upd_player, upd_player_stat, and upd_pitcher_stat procedures are grouped together in a package. A variable must be shared among only these procedures. Where should you declare...
- Question #5
Examine this package: CREATE OR REPLACE PACKAGE discounts IS g_id_NUMBER := 7839; discount_rate NUMBER := 0.00; PROCEDURE display_price (p_price NUMBER); END discounts; / CREATE OR...
- Question #6
Examine this code: CREATE OR REPLACE PACKAGE comm_package IS g_comm NUMBER := 10; PROCEDURE reset_comm(p_comm IN NUMBER) END comm_package; / User Jones executes the following code...
- Question #7
Examine this code: CREATE OR REPLACE FUNCTION gen_email_name (p_first_name VARCHAR2, p_last_name VARCHAR2, p_id_NUMBER) RETURN VARCHAR2 IS v_email_name VARCHAR2(19); BEGIN v_email_...
- Question #8
Examine this code: CREATE OR REPLACE TRIGGER secure_emp BEFORE LOGON ON employees BEGIN IF (TO_CHAR(SYSDATE, 'DY') IN ('SAT', 'SUN')) OR (TO_CHAR(SYSDATE, 'HH24:MI') NOT BETWEEN '0...
- Question #9
What happens during the execute phase with dynamic SQL for INSERT, UPDATE, and DELETE operations?
- Question #10
You need to remove the database trigger BUSINESS_HOUR. Which command do you use to remove the trigger in the SQL*Plus environment?
- Question #11
Which three are valid ways to minimize dependency failure? (Choose three.)
- Question #12
Examine this package: CREATE OR REPLACE PACKAGE manage_emps IS tax_rate CONSTANT NUMBER(5,2) := .28; v_id NUMBER; PROCEDURE insert_emp (p_deptno NUMBER, p_sal NUMBER); PROCEDURE de...
- Question #13
Procedure PROCESS_EMP references the table EMP. Procedure UPDATE_EMP updates rows in table EMP through procedure PROCESS_EMP. There is a remote procedure QUERY_EMP that queries the...
- Question #14
Which two statements about packages are true? (Choose two.)
- Question #15
Which statement about triggers is true?
- Question #16
Which two statements about the overloading feature of packages are true? (Choose two.)
- Question #17
Examine this code: CREATE OR REPLACE FUNCTION calc_sal (p_salary NUMBER) RETURN NUMBER IS v_raise NUMBER(4,2) DEFAULT 1.08; BEGIN RETURN v_raise * p_salary; END calc_sal; / Which s...
- Question #18
Which part of a database trigger determines the number of times the trigger body executes?
- Question #19
Examine the code examples. Which one is correct?
- Question #20
Examine this code: CREATE OR REPLACE PROCEDURE audit_action (p_who VARCHAR2) AS BEGIN INSERT INTO audit(schema_user, VALUES(p_who); END audit_action; / CREATE OR REPLACE TRIGGER wa...
- Question #21
Examine this code: CREATE OR REPLACE PACKAGE metric_converter IS c_height CONSTANT NUMBER := 2.54; c_weight CONSTANT NUMBER := .454; FUNCTION calc_height (p_height_in_inches NUMBER...
- Question #22
You have an AFTER UPDATE row-level trigger on the table EMP. This trigger queries the EMP table and inserts the updating user's information into the AUDIT_TABLE . What happens when...
- Question #23
Examine this code: CREATE OR REPLACE STORED FUNCTION get_sal (p_raise_amt NUMBER, p_employee_id employees.employee_id%TYPE) RETURN NUMBER IS v_salary NUMBER; v_raise NUMBER(8,2) ;...
- Question #24
Why do you use an INSTEAD OF trigger?
- Question #25
Given a function CALCTAX: CREATE OR REPLACE FUNCTION calctax (sal NUMBER) RETURN NUMBER IS BEGIN RETURN (sal * 0.05); END; / If you want to run the above function from the SQL*Plus...
- Question #26
What is the name of the private procedure in this package?
- Question #27
You have a row level BEFORE UPDATE trigger on the EMP table. This trigger contains a SELECT statement on the EMP table to ensure that the new salary value falls within the minimum...
- Question #28
Mr. King is the president of a company. Five managers report to him. All other employees report to these managers. Examine the code: SELECT employee_ename FROM emp employee WHERE e...
- Question #29
Which statement about multiple column subqueries is true?
- Question #30
Which four triggering events can cause a trigger to fire? (Choose four.)
- Question #31
You create a DML trigger. For the timing information, which, are valid with a DML trigger? (Choose all that apply.)
- Question #32
Consider this scenario: A procedure X references a view Y that is based on a table Z. Which two statements are true? (Choose two.)
- Question #33
Examine this function: CREATE OR REPLACE FUNCTION CALC_PLAYER_AVG (V_ID IN PLAYER_BAT_STAT.PLAYER_ID%TYPE) RETURN NUMBER IS V_AVG NUMBER; BEGIN SELECT HITS / AT_BATS INTO V_AVG FRO...
- Question #34
Examine this procedure: CREATE OR REPLACE PROCEDURE INSERT_TEAM (V_ID IN NUMBER, V_CITY IN VARCHAR2 DEFAULT 'AUSTIN', V_NAME IN VARCHAR2) IS BEGIN INSERT INTO team (id, city, name)...
- Question #35
How can you migrate from a LONG to a LOB data type for a column?
- Question #36
Which table should you query to determine when your procedure was last compiled?
- Question #37
When using a PL/SQL stored package, how is a side effect defined?
- Question #38
Examine this code: CREATE OR REPLACE PROCEDURE load_bfile (p_file_loc IN VARCHAR2) IS V_file BFILE; V_filename VARCHAR2(16); CURSOR emp_cursor IS SELECT employee_id FROM employees...
- Question #39
Which two describe a stored procedure? (Choose two.)
- Question #40
You need to create a trigger to ensure that information in the EMP table is only modified during business hours, Monday to Friday from 9:00am to 5:00pm. Which types of trigger do y...
- Question #41
You need to create a DML trigger. Which five pieces need to be identified? (Choose five.)
- Question #42
You disabled all triggers on the EMPLOYEES table to perform a data load. Now, you need to enable all triggers on the EMPLOYEES table. Which command accomplishes this?
- Question #43
Examine this package: CREATE OR REPLACE PACKAGE discounts IS g_id_number := 7829; g_discount_rate NUMBER := 0.00; PROCEDURE display_price (p_price NUMBER); END discounts; / CREATE...
- Question #44
You want to create procedures, functions and packages. Which privilege do you need?
- Question #45
The creation of which four database objects will cause a DDL trigger to fire? (Choose four.)
- Question #46
Examine this code: CREATE OR REPLACE PROCEDURE add_dept (p_dept_name VARCHAR2 DEFAULT 'placeholder', p_location VARCHAR2 DEFAULT 'Boston') IS BEGIN INSERT INTO departments VALUES (...
- Question #47
Which type of argument passes a value from a procedure to the calling environment?
- Question #48
When creating stored procedures and functions, which construct allows you to transfer values to and from the calling environment?
- Question #49
You need to implement a virtual private database (vpd). In order to have the vpd functionality, a trigger is required to fire when every user initiates a session in the database. W...
- Question #50
Examine the declaration section: DECLARE CURSOR emp_cursor(p_deptno NUMBER, p_job VARCHAR2) IS SELECT empno, ename FROM emp WHERE deptno = p_deptno AND job = p_job; BEGIN ... Which...