1Z0-146 | What Certified 1Z0-146 pdf Is?


Q41. Identify three guidelines for the DBMS_ASSERT package. (Choose three.) 

A. Prefix all calls to DBMS_ASSERT with the SYS schema name. 

B. Embed DBMS_ASSERT verification routines inside the injectable string. 

C. Escape single quotes when you use the ENQUOTE_LITERAL procedure. 

D. Define and raise exceptions explicitly to handle DBMS_ASSERT exceptions. 

E. Prefix all calls to DBMS_ASSERT with a schema name that owns the subprogram that uses the DBMS_ASSERT package. 

Answer: A,C,D 

Q42. You issue the following command to create the PRINT_MEDIA table. 

CREATE TABLE print_media 

(product_id NUMBER(3), 

ad_sourcetext CLOB, 

ad_photo BLOB); 

Evaluate the following INSERT statements: 

INSERT INTO print_media VALUES (1, empty_clob(),empty_blob()); 

INSERT INTO print_media VALUES (2,'This is a One Line Story',null); 

INSERT INTO print_media VALUES (3,'This is another One Line Story',empty_blob()); 

INSERT INTO print_media VALUES (4,empty_clob(),to_blob('This is new Story')); 

Which of the above INSERT statements are valid? 

A. Only the first statement is valid. 

B. All the statements are valid. 

C. Only the first and fourth statements are valid. 

D. Only the first and second statements are valid. 

E. Only the first, second and third statements are valid. 

Answer:

Q43. Examine the following command to create the table EMPLOYEES_TEMP and the PL/SQL block. 

CREATE TABLE employees_temp (empid NUMBER(6) NOT NULL, 

deptid NUMBER(6) CONSTRAINT c_emp_deptid CHECK (deptid BETWEEN 100 AND 200), 

salary Number(8), 

deptname VARCHAR2(30) DEFAULT 'Sales') 

DECLARE 

SUBTYPE v_emprec_subtype IS employees_temp%ROWTYPE; 

v_emprec v_emprec_subtype; 

BEGIN 

v_emprec.empid := NULL; v_emprec.salary := 10000.002; 

v_emprec.deptid := 50; 

DBMS_OUTPUT.PUT_LINE('v_emprec.deptname: ' || v_emprec.deptname); 

END; 

Which statements are true about the above PL/SQL block? (Choose two.) 

A. V_EMPREC.DEPTNAME would display a null value because the default value is not inherited. 

B. Assigning null to V_EMPREC.EMPID would generate an error because the null constraint is inherited. 

C. Assigning the value 1000.002 to V_EMPREC.SALARY would generate an error because of the decimal. 

D. Assigning the value 50 to V_EMPREC.DEPTID would work because the check constraint is not inherited. 

Answer: A,D 

Q44. Which two statements are true about cursor variables? (Choose two.) 

A. Cursor variables can be parameterized like cursors. 

B. The query associated with a cursor variable cannot reference host variables and PL/SQL variables. 

C. The FETCH statement executes the query associated with a cursor variable and identifies the result set. 

D. Cursor attributes (%FOUND, %NOTFOUND, %ISOPEN, and %ROWCOUNT) can be applied to a cursor variable. 

E. The OPEN FOR statement executes the query associated with a cursor variable and identifies the result set. 

Answer: D,E 

Q45. View the Exhibit and examine the PL/SQL code. 

Which statement is true about the execution of the PL/SQL code? 

A. It executes successfully and displays 101 and 200000 values. 

B. The ASSIGN_VAL function generates an error during compilation because nested tables cannot be returned by functions. 

C. The SELECT statement generates an error because the nested table has not been initialized in the ASSIGN_VAL function. 

D. The ASSIGN_VAL function generates an error during compilation because the EXTEND method cannot be used with nested tables. 

Answer:

Q46. Which two statements are true about associative arrays and varrays? (Choose two.) 

A. Only varrays must start with the subscript 1. 

B. Only varrays can be used as column types in database tables. 

C. Both associative arrays and varrays must start with the subscript 1. 

D. Both associative arrays and varrays can be used as column types in database tables. 

Answer: A,B 

Q47. View the Exhibit and examine the output. 

Which statement is an inference from the output? 

A. The class file is pinned into the Java pool. 

B. The class file has been loaded into the shared library. 

C. Java class methods in the Java class file have been published. 

D. The loadjava command has been executed to load the Java source and class files. 

Answer:

Q48. Which three actions can be performed by using the DBMS_ASSERT package to prevent SQL injection? (Choose three.) 

A. Detect a wrong user. 

B. Check input string length. 

C. Verify qualified SQL names. D. Validate TNS connect strings. 

E. Verify an existing schema name. 

F. Enclose string literals within double quotation marks. 

Answer: C,E,F 

Q49. Which two statements are true about the query results stored in the query result cache? (Choose two.) 

A. If any of the tables used to build a query is modified by an ongoing transaction in the current session, the query result is not cached. 

B. A query result based on a read-consistent snapshot of data that is older than the latest committed version of the data is not cached. 

C. Adding the RESULT_CACHE hint to inline views enables optimizations between the outer query and the inline view, and the query result is cached. 

D. A query result for a query that has a bind variable is stored in the cache and is reused if the query is equivalent even when the bind variable has a different value. 

Answer: A,B 

Q50. Examine the structure of the EMPLOYEES table in the SCOTT schema. Name Null? Type 

EMPLOYEE_ID NOT NULL NUMBER(6) 

FIRST_NAME VARCHAR2(20) 

LAST_NAME NOT NULL VARCHAR2(25) 

SALARY NOT NULL NUMBER(8,2) 

COMMISSION_PCT NUMBER(2,2) 

DEPARTMENT_ID NUMBER(4) 

View the Exhibit and examine the code for the EMP_TOTSAL procedure created by user SCOTT. 

Which statement is true regarding the EMP_TOTSAL procedure? 

A. It is created successfully, but displays the correct output message only for existent employee IDs. 

B. It is created successfully and displays the correct output message for both existent and nonexistent employee IDs. 

C. It generates an error because the %NOTFOUND attribute cannot be used in combination with a SELECT INTO statement. 

D. It generates an error because a user-defined exception has to be included whenever the %NOTFOUND attribute is used in combination with a SELECT INTO statement. 

Answer: