Page 3 of 14APP_ITEM_PROPERTY.SET_PROPERTYAPP_ITEM_PROPERTY.SET_VISUAL_ATTRIBUTE
APP_NAVIGATE: Open a Form Function
Two parameters that are mandatory for pl/sql typeconcurrent program
Procedure/function (ERRBUF OUTRETCODE OUT………………….)
Used to write the error message tolog or request file.
Populate log request file withprogram submission details info1
. Describe the difference between a procedure,function and anonymous pl/sql block.
should mention use of DECLARE statement, Afunction and procedure are the same in that they areintended to be a collection of PL/SQL code thatcarries a single task. a function must return a valuewhile a procedure doesn’t have to.2.
What is a mutating table error and how can youget around it?
This happens with triggers. It occurs because thetrigger is trying to update a row it is currently using.The usual fix involves either use of views or temporary tables so the database is selecting fromone while updating the other.
3. Describe the use of %ROWTYPE and %TYPE inPL/SQL
%ROWTYPE allows you to associate a variable withan entire table row. The %TYPE associates a variablewith a single column type.
4. What packages (if any) has Oracle provided for use by developers?
Oracle provides the DBMS_ series of packages.Such as DBMS_SQL, DBMS_PIPE,DBMS_TRANSACTION, DBMS_LOCK,DBMS_ALERT, DBMS_OUTPUT, DBMS_JOB,DBMS_UTILITY, DBMS_DDL, UTL_FILE.
5. Describe the use of PL/SQL tables
PL/SQL tables are scalar arrays that can bereferenced by a binary integer. They can be used tohold values for use in later queries or calculations. InOracle 8 they will be able to be of the %ROWTYPEdesignation, or RECORD.
6. When is a declare statement needed ?
The DECLARE statement is used in PL/SQLanonymous blocks such as with stand alone, non-stored PL/SQL procedures. It must come first in aPL/SQL stand alone file if it is used.
7. In what order should a open/fetch/loop set of commands in a PL/SQL block be implemented if you use the %NOTFOUND cursor variable in theexit when statement? Why?
OPEN then FETCH then LOOP followed by the exitwhen. If not specified in this order will result in thefinal return being done twice because of the way the%NOTFOUND is handled by PL/SQL.
8. What are SQLCODE and SQLERRM and why arethey important for PL/SQL developers?
SQLCODE returns the value of the error number for thelast error encountered. The SQLERRM returns theactual error message for the last error encountered.They can be used in exception handling to report, or,store in an error log table, the error that occurred in thecode. These are especially useful for the WHENOTHERS exception.
9. How can you find within a PL/SQL block, if acursor is open?
Use the %ISOPEN cursor status variable.
10. How can you generate debugging output fromPL/SQL?
Use the DBMS_OUTPUT package. Another possiblemethod is to just use the SHOW ERROR command, butthis only shows errors. The DBMS_OUTPUT packagecan be used to show intermediate results from loops andthe status of variables as the procedure is executed.The new package UTL_FILE can also be used.
11. What are the types of triggers?
There are 12 types of triggers in PL/SQL that consist of combinations of the BEFORE, AFTER, ROW, TABLE,INSERT, UPDATE, DELETE and ALL key words:BEFORE ALL ROW INSERT, AFTER ALL ROWINSERT, BEFORE INSERT ,AFTER INSERT etc.
What is the dual table?
A single row table provided by oracle for selectingvalues and expressions.
Describe the block structure of PLSQL
. Declaration,Begin, exception, end.
What is an anonymous block?
Unnamed PL/SQL block.
What is a PL/SQL collection?
PL/SQL Table, Varray, PL/SQL Array, etc.
What is a nested subquery?
A subquery in a where clause.
How can you tell if an UPDATE updated no rows?
How can you tell if a SELECT returned no rows.
How do you run Native Dynamic SQL?
What is an autonomous transaction?
Identified by pragma autonomous. A child transactionseparate from the parent that MUST be committed or rolled back.
- created for every SQL Query by theDBMS without user interaction.
- explicitly declared, opened, fetchedand closed by the user explicitly. The user has completecontrol over the explicit cursor.
command will log the data changes in the log filewhere as the
will simply remove the datawithout it. Hence Data removed by Delete command canbe rolled back but not the data removed by TRUNCATE.Truncate is a DDL statement whereas DELETE is aDML statement.