1Z0-144 Premium Bundle

1Z0-144 Premium Bundle

Oracle Database 11g: Program with PL/SQL Certification Exam

4.5 
(19620 ratings)
0 QuestionsPractice Tests
0 PDFPrint version
May 20, 2024Last update

Oracle 1Z0-144 Free Practice Questions

Q1. Examine the following package specification: 

Which statement is true? 

A. g_comm has a value of 15 at 9: 06 AM only for Jones 

B. g_comm has a value of 10 at 9: 03 AM for both Jones and smith 

C. g_comm has a value of 15 at 9: 03 AM for both Jones and smith 

D. g_comm has a value of 20 at 9: 06 AM for both Jones and smith 

Answer:

Explanation: 

Package variable state is scoped at the session level. So the only user who can see G_COMM=15 will be Jones 

Q2. View Exhibit1 and examine the structure of the EMP table. 

View Exhibit2 and examine the code created by the user SCOTT: 

SCOTT grants the necessary privileges to green to access the EMP table and execute the package. 

Examine the following sequence of activities: 

SCOTT starts a session and issues the SQL>EXEC CURS_PKG.OPEN command. 

SCOTT then issues the SQL>EXEC CURS_PKG.NEXT command. 

green starts a session while SCOTT’s session is running and issues THE SQL>EXEC 

CURS_PKG.NEXT command. 

SCOTT issues the SQI>>EXEC SCOTT.CURS_PKG.NEXT command. 

The EMP table contains sequential EMPNOS from 100 through 108. 

Which statement correctly describes the output? 

A. SCOTT’s session shows the EMPNO 100, GREEN'S session shows an error, and SCOTT’s session shows an error. 

B. SCOTT’s session shows the EMPNO 100, GREEN'S session shows EMPNO 100, and SCOTT’s session shows the EMPNO 101. 

C. SCOTT’s session shows the EMPNO 100, GREEN'S session shows an error, and SCOTT’s session shows the second EMPNO 101. 

D. SCOTT’s session shows the EMPNO 100, GREEN'S session shows EMPNO 101, and SCOTT’s session shows the second EMPNO 102. 

Answer:

Q3. ORDER_TOTAL is a column in the orders table with the data type and size as number (8, 2) Examine the following code: 

Which statement is correct about the above code? 

A. It gives an error in line 3 

B. It gives an error in line 4 

C. It gives an error in line 6 

D. It executes successfully and displays the output. 

Answer:

Q4. Examine the following snippet of PL/SQL code: 

View the exhibit for table description of EMPLOYEES table. The EMPLOYEES table has 200 rows. 

Identify open statement for opening the cursor that fetches the result as consisting of employees with JOB_ID as ‘ST_CLERK’ and salary greater than 3000. 

A. OPEN c1 (NULL, 3000); 

B. OPEN c1 (emp_job, 3000); 

C. OPEN c1 (3000, emp_salary); 

D. OPEN c1 (‘ST_CLERK’, 3000) 

E. OPEN c1 (EMP_job, emp_salary); 

Answer:

Q5. Which two statements are true about the %ROWTYPE attribute? (Choose two.) 

A. It is used to declare a record that can hold multiple rows of a table. 

B. The attributes of fields in the record with the %ROWTYPE attribute can be modified manually. 

C. The attributes of fields in the record take their names and data types from the columns of the table, view, cursor, or cursor variable. 

D. It ensures that the data types of the variables that are declared with the %ROWTYPE attribute change dynamically when the underlying table is altered. 

Answer: C,D 

Q6. View Exhibit1 and examine the structure of the employees table. 

View Exhibit2 and examine the code. 

What is the outcome when the code is executed? 

A. Both blocks compile and execute successfully when called. 

B. Both blocks compile successfully but the CALC_SAL procedure gives an error on execution. 

C. The CALC_SAL procedure gives an error on compilation because the amt variable should be declared in the RAISE_SALARY procedure. 

D. The CALC_SAL procedure gives an error on compilation because the RAISE_SALARY procedure cannot call the stand-alone increase function. 

Answer:

Q7. View the Exhibit to examine the PL/SQL code: 

SREVROUPUT is on for the session. Which statement Is true about the output of the PL/SQL block? 

A. The output is x = y. 

B. It produces an error. 

C. The output Is x != y. 

D. The output Is Can't tell if x and y are equal or not. 

Answer:

Q8. Which statements correctly describe the features of functions and procedures? (Choose all that apply.) 

A. A procedure can contain a return statement without a value. 

B. A function can return multiple values using a single return clause, 

C. A procedure can be executed as part of a SQL expression or as a PL/SQL statement, 

D. A function can contain zero or more parameters that are transferred from the calling environment. 

Answer:

Explanation: Reference: http://docs.oracle.com/cd/B19306_01/appdev.102/b14261/subprograms.htm (using the return statement) 

Q9. View Exhibit1 and examine the structure of the EMP table. 

View Exhibit2 and examine the code. 

EKPNOS 7845 and 7900 exist in the EMP table. 

Which two calls to the RAISE_SALABY procedure in the anonymous block execute successfully? (Choose two.) 

A. call in line 6 

B. call in line 7 

C. call in line 8 

D. call in line 9 

Answer: C,D 

Q10. View Exhibit 1 and examine the structure of the EMP table. 

View Exhlbit2 and examine the code of the packages that you have created. 

You issue the following command: 

SQL> DROP PACKAGE manage_emp; 

What is the outcome? 

A. It drops both the MANAGE_EMP AND EMP__DET packages because of the cascading effect. 

B. It drops the MANAGE_EMP package and invalidates only the body for the EMP_DET package. 

C. It returns an error and does not drop the MAMAGE_EMP package because of the cascading effect. 

D. It drops the MANAGE_EMP package and invalidates both the specification and body for the EMP_DET package. 

Answer:

Q11. View the Exhibit and examine the structure of the employees table. 

Execute the following block of code: 

What is the outcome? 

A. It gives an error because group functions cannot be used in anonymous blocks 

B. It executes successfully and correctly gives the result of the sum of salaries in 

department 60. 

C. It executes successfully and incorrectly gives the result of the sum of salaries in department 60. 

D. It gives an error because the variable name and column name are the same in the where clause of the select statement. 

Answer:

Q12. View the Exhibit and examine the code: 

Which statement is true about the COMPILE_CODE procedure? 

A. It gives an error in line 6. 

B. It gives an error in line 8. 

C. It gives an error in line 5. 

D. It executes successfully, but displays a warning about the unreachable code when used for the PROC1 procedure. 

E. It executes successfully, but a warning about the unreachable code is not displayed when used for the PROC1 procedure. 

Answer:

Q13. View the exhibit and examine the structure of the EMPLOYEE table. 

EMPLOYEE_SEQ is an existing sequence. 

Examine the following block of code: 

Which statement is true about the above block of code? 

A. It consists of two transactions 

B. It consists of a single transaction, 

C. The data is automatically committed after the block execution ends, 

D. It gives an error on execution because sequences cannot be used in anonymous blocks. 

Answer:

Q14. Which system events can be used to create triggers that fire both at database and schema levels? (Choose all that apply) 

A. AFTER LOGON 

B. AFTER STARTUP 

C. BEFORE SHUTDOWN 

D. AFTER SERVERERROR 

Answer: A,D 

Explanation: 

http://docs.oracle.com/cd/E11882_01/appdev.112/e25519/create_trigger.htm#LNPLS2064 

Q15. Which two statements are true about statement-level and row-level triggers? (Choose two.) 

A. A row trigger fires once even if no rows are affected. 

B. A statement trigger fires once even if no rows are affected. 

C. Row triggers are useful if the trigger action depends on the data of rows that are affected or on data that is provided by the triggering event itself. 

D. Statement triggers are useful if the trigger action depends on the data of rows that are affected or on data that is provided by the triggering event itself. 

Answer: B,C 

START 1Z0-144 EXAM