Oracle PLSQL PDF
Oracle PLSQL PDF
Get the Full 1Z0-144 dumps in VCE and PDF From SurePassExam
https://www.surepassexam.com/1Z0-144-exam-dumps.html (103 New Questions)
Oracle
Exam Questions 1Z0-144
Oracle Database 11g: Program with PL/SQL
NEW QUESTION 1
Which statement is true about triggers on data definition language (DDL) statements?
Answer: D
NEW QUESTION 2
Examine the following package specification.
SQL>CREATE OR REPLACE PACKAGE emp_pkf IS
PROCEDURE search_emp (empdet NUMBER);
PROCEDURE search_emp (empdet DATE);
PROCEDURE search_emp (empdet NUMBER); RETURN VERCHAR2
PROCEDURE search_emp (empdet NUMBER); RETURN DATE
END emp_pkg
/
The package is compiled successfully
Why would it generate an error at run tune?
Answer: B
NEW QUESTION 3
Which two statements are true about PL/SQL exception propagation? (Choose two.)
A. The exception reproduces Itself In successive enclosing blocks until a handler is foun
B. Exception- can propagate across the remote subprograms that are called through database link
C. If you declare a local exception in a subblock and a global exception in the outer block, the local declaration overrides the global exceptio
D. If you declare a local exception in a subblock and a global exception in the outer block, the global declaration overrides the local exceptio
Answer: AC
NEW QUESTION 4
Examine the following PL/SQL code:
Which statement is true about the fetch statements in the PL/SQL code?
A. Each fetch retrieves the first row and assigns values to the target variable
B. Each fetch retrieves the next consecutive row and assigns values to the target variable
C. They produce an error because you must close and reopen the cursor before each fetch -statemen
D. Only the first fetch retrieves the first row and assigns values to the target variables- the second produces an erro
Answer: B
NEW QUESTION 5
View the Exhibit and examine the code.
Answer: A
NEW QUESTION 6
Which two statements are true about statement-level and row-level triggers? (Choose two.)
Answer: BC
NEW QUESTION 7
View the Exhibit to examine the PL/SQL code.
The record for the employee with employee__id 100 in the employees table is as follows;
Answer: A
NEW QUESTION 8
/temp/my_files is an existing folder in the server, facultylist.txt is an existing text file in this folder
Examine the following commands that are executed by the DBA:
SQL>CREATE DIRECTION my_dir AS ‘ /temp/my_files’:
SQL>GRANT READ ON DIRECTORY my_dir To pubiic:
View the Exhibit and examine the procedure created by user SCOTT to read the list of faculty names from the text file.
Answer: B
NEW QUESTION 9
View the exhibit to examine the PL/SQL code.
Which statement is true about the exception handlers in the PL/SQL code?
A. All the exceptions in the code are trapped by the exception handle
B. All the "no data found" errors in the code are trapped by the exception handle
C. The PL/SQL program does not execute because an exception is not declared in the declare sectio
D. An exception handler in the code traps the "no data found" error after executing the handler code and the program flow returns to the next line of cod
Answer: B
NEW QUESTION 10
Examine the following PL/SQL code:
The server output is on for the session. Which statement is true about the execution of the code?
Answer: A
NEW QUESTION 10
Examine the following PL/SQL code;
The execution of the code produces errors. Identify the error in the code.
Answer: B
NEW QUESTION 11
You want to maintain an audit of the date and time when each user of the database logs off.
Examine the following code:
Which two clauses should be used to fill in the blanks and complete the above code? (Choose two.)
A. ON SCHEMA
B. ON QRXABASE
C. AFTER LOGOFF
D. BEFORE LOGOFF
Answer: AD
NEW QUESTION 13
Examine the following code:
Answer: C
NEW QUESTION 14
Examine the following package specification:
Answer: A
Explanation:
Package variable state is scoped at the session level. So the only user who can see G_COMM=15 will be Jones
NEW QUESTION 17
View the exhibit and examine the structure of the EMPLOYEE table.
EMPLOYEE_SEQ is an existing sequence.
Examine the following block of code:
Answer: A
NEW QUESTION 22
View the Exhibit and examine the structure of the EMP table.
Which stages are performed when the above block is executed? (Choose all that apply)
A. Bind
B. Parse
C. Fetch
D. Execute
Answer: BCD
NEW QUESTION 23
View the Exhibit and examine the structure of the SALGRADE table.
A. It is created successfull
B. It gives an error because the return clause condition is invali
C. It gives an error because the usage of the host variables is invali
D. It gives an error because the data type of the return clause is invali
Answer: B
NEW QUESTION 27
Examine the following block of code:
Which line in the above code would result in errors upon execution?
A. line 5
B. line 8
C. line 2
D. line 7
Answer: B
NEW QUESTION 32
Which two statements are true about the handling of internally defined or user-defined PL7SQL exceptions? (Choose two.)
Answer: CD
NEW QUESTION 34
You create a procedure to handle the processing of bank current accounts which rolls back payment transactions if the overdraft limit is exceeded.
The procedure should return an "error" condition to the caller in a manner consistent with other Oracle server errors.
Which construct should be used to handle this requirement?
Answer: B
Explanation:
Reference: http://docs.oracle.com/cd/B28359_01/appdev.111/b28370/exceptioninit_pragma.htm#LNPL S01315
NEW QUESTION 35
Examine the following code:
A. The procedure is created successfully and displays the values 20 and 30 when it is calle
B. The procedure gives errors because the parameters should be in out mod
C. The procedure gives errors because the host variables cannot be referenced anywhere in the definition of a PL/SQL stored procedur
D. The procedure is created successfully but does not display any values when it is called because the host variables cannot be displayed inside the procedur
Answer: C
NEW QUESTION 40
In which of the following scenarios would you recommend using associative arrays?
A. When you want to retrieve an entire row from a table and perform calculations
B. When you know the number of elements in advance and the elements are usually accessed sequentially
C. When you want to create a separate lookup table with multiple entries for each row of the main table, and access it through join queries
D. When you want to create a relatively small lookup table, where the collection can be constructed on memory each time a subprogram is invoke
Answer: CD
NEW QUESTION 41
View the Exhibit and examine the structure of the employees table.
Answer: C
NEW QUESTION 45
Consider the following scenario:
Local procedure a calls remote procedure B
Procedure A was compiled at 8 AM.
Procedure A was modified and recompiled at 9 AM.
Remote procedure B was later modified and recompiled at 11 AM.
The dependency mode is set to timestamp.
Which statement correctly describes what happens when procedure A is invoked at 1 PM?
Answer: D
NEW QUESTION 48
View the exhibit and examine the structure of the EMPLOYEES table
Answer: C
NEW QUESTION 52
Examine the following code:
Answer: A
NEW QUESTION 55
View the Exhibits and examine the structure of the EMPLOYEES, DEPARTMENTS AND EMP_BY_DEPT tables.
EMPLOYEES
DEPAERTMENT
EMP_BY_DEPT
Answer: A
NEW QUESTION 57
View Exhibit1 and examine the structure of the employees table.
B. Both blocks compile successfully but the CALC_SAL procedure gives an error on executio
C. The CALC_SAL procedure gives an error on compilation because the amt variable should be declared in the RAISE_SALARY procedur
D. The CALC_SAL procedure gives an error on compilation because the RAISE_SALARY procedure cannot call the stand-alone increase functio
Answer: A
NEW QUESTION 58
Identify the scenario in which you would use the current of clause for an update or delete statement to rows fetched from a cursor.
Answer: B
NEW QUESTION 63
Identify situations in which the DBMS_SQL package is the only applicable method of processing dynamic SQL. (Choose all that apply.)
Answer: BC
NEW QUESTION 67
View Exhibit 1 and examine the structure of the EMP and dept tables.
View Exhibit2 and examine the trigger code that is defined on the dept table to enforce the update and delete restrict referential actions on the primary key of the
dept table.
Answer: B
NEW QUESTION 71
View the Exhibit and examine the package code created by SCOTT. The execute privilege on this package is granted to green.
Answer: B
NEW QUESTION 73
View the Exhibit to examine the PL/SQL block.
Answer: A
NEW QUESTION 78
Which statements are true about PL/SQL procedures? (Choose all that apply.)
A. Users with definer's rights who are granted access to a procedure that updates a table must be granted access to the table itsel
B. Reuse of parsed PL/SQL code that becomes available in the shared SQL area of the server avoids the parsing overhead of SQL statements at run tim
C. Depending on the number of calls, multiple copies of the procedure are loaded into memory for execution by multiple users to speed up performanc
D. A PL/SQL procedure executing on the Oracle database can call an external procedure or function that is written in a different programming language, such as C
or Jav
Answer: BD
NEW QUESTION 82
Which two statements correctly differentiate functions and procedures? (Choose two.)
A. A function can be called only as part of a SQL statement, whereas a procedure can be called only as a PL7SQL statemen
B. A function must return a value to the calling environment, whereas a procedure can return zero or more values to its calling environmen
C. A function can be called as part of a SQL statement or PL/SQL expression, whereas a procedure can be called only as a PL/SQL statemen
D. A function may return one or more values to the calling environment, whereas a procedure must return a single value to its calling environmen
Answer: BC
NEW QUESTION 86
View the Exhibit and examine the structure of the customer table.
You create the following trigger to ensure that customers belonging to category "A" or "B" in the customer table can have a credit limit of more than 8000.
Answer: D
NEW QUESTION 91
Which two statements are true about the PL/SQL initialization parameters? (Choose two.)
A. To use native code compilation, PLSQL_OPTIMIZE_I.EVEL should be set to a value less than or equal to
B. The default value of 2 for PLSQL_OPTIMI2E_LEVEL allows the compiler to rearrange code for better performanc
C. Setting PLSQL_CODE_TYPE to native provides the greatest performance gains only for computation-intensive procedural operation
D. Changing the value of the PLSQL_CODE_TYPE parameter affects all the PL/SQL library units that have already been compiled
Answer: BC
NEW QUESTION 93
View the Exhibit and examine the structure of the EMP table.
You want to create two procedures using the overloading feature to search for employee details based on either the employee name or employee number.
Which two rules should you apply to ensure that the overloading feature is used successfully? (Choose two.)
Answer: BE
NEW QUESTION 96
View the exhibit and examine the structure of the products table.
A. It executes successfully but no error messages get recorded in the DEBUG_OUTPUT table
B. It executes successfully and any error messages get recorded in the DEBUG_OUTPUT tabl
C. It gives an error because PRAGMA AUTONOMOUS_TRANSACTION can be used only in packaged procedure
D. It gives an error because procedures containing PRAGMA AUTONOMOUS_TRANSACTION cannot be called from the exception sectio
Answer: A
Explanation: In this case, the debug output will only occur if there is an exception.
Answer: A
Answer: D
Which line(s) in the above code are NOT valid? (Choose all that apply.)
A. line 2
B. line 3
C. line 4
D. line 5
Answer: BD
Answer: BE
Answer: BC
The server output is on for the session. Which statement is true about the execution of the code?
Answer: B
A. It is a private variable defined in a procedure or function within a package body whose value is consistent within a user sessio
B. It is a public variable in a package specification whose value is consistent within a user sessio
C. It is a private variable in a package body whose value is consistent across all current active session
D. It is a public variable in a package specification whose value is always consistent across all current active session
Answer: B
Answer: A
View Exhlbit2 and examine the code of the packages that you have created.
A. It drops both the MANAGE_EMP AND EMP__DET packages because of the cascading effec
B. It drops the MANAGE_EMP package and invalidates only the body for the EMP_DET packag
C. It returns an error and does not drop the MAMAGE_EMP package because of the cascading effec
D. It drops the MANAGE_EMP package and invalidates both the specification and body for the EMP_DET packag
Answer: B
Answer: AC
Explanation: Explanation/Reference:
Functions are used to return a value. Functions must return only a single value.
Procedure are used to perform an action.
Both functions and procedures are using to do a special task or action. In functions it is
must to return a single value, where as in procedures it’s not compulsory
Answer: BD
Answer: A
A. Only HR
B. SCOTT and HR
C. Only SCOTT
D. SCOTT, HR, and SYS
Answer: A
SREVROUPUT is on for the session. Which statement Is true about the output of the PL/SQL block?
A. The output is x =
B. It produces an erro
C. The output Is x !=
D. The output Is Can't tell if x and y are equal or no
Answer: A
Answer: A
A. It executes successfull
B. It generates a run-time exceptio
C. It does not execute because of syntax error
D. It executes successfully and generates a warnin
Answer: B
Answer: A
* 1Z0-144 Most Realistic Questions that Guarantee you a Pass on Your FirstTry
* 1Z0-144 Practice Test Questions in Multiple Choice Formats and Updatesfor 1 Year