Oracle Tutorials

Google

PL/SQL is the language used for both client-side Oracle forms applications and server-side database triggers and stored procedures and there is a PL/SQl engine in both Oracle forms
Runform and the Oracle7 Server.
This means that you can take advantage of application patitioning to execute application code on either the client or the server.
Application partitioning allows you to optimize performance and resource usage by storing and executing procedures either locally or at the server, which makes the most sense for your
particular application and configuration.
28. Difference between a STORED PROCEDURE and a STORED FUNCTION ?
Unlike procedures, FUNCTIONS returns a VALUE to the caller. This value is returned thro' the RETURN command/keyword within the function.
Functions don't use the IN, OUT | IN OUT arguments, which are available for PROCEDURES.

29. How to RUN PROCEDURES from SQL PROMPT ?
Use EXECUTE Procedure_name command.
30. How to TRAP ERRORS in procedures ?
Use SHOW_ERRORS. this will display all the errors associated with the most recently created procedural object. This command will check the VIEW_ERRORS data dictionary for the
ERRORS associated with the most recent compilation attempt for that procedural object.
SHOW_ERRORS will display the LINE and COLUMN NO. for each error, as well as the text of the error message.

DBMS_OUTPUT package allows you to use 3 debugging functions within your package. You
must set `SERVER OUTPUT ON' before executing the procedure object you will be debugging.
PUT - Puts multiple o/p's on same line. PUT_LINE - Puts each o/p on a separate line. NEW_LINE - Used with PUT; Signals the END of current o/p line.
38. What is the DIFFERENCE between PRE-QUERY and POST-QUERY ?
PRE-QUERY fires ONLY ONCE during EXECUTE-QUERY or COUNT-QUERY processing, just before Oracle Forms constructs and issues the SELECT statement to identify rows
that match the query criteria.
POST-QUERY fires each time for records placed on the blocks list of records.
41. What is the DIFFERENCE between EXPLICIT CURSOR & IMPLICIT CURSOR ?
IMPLICIT CURSORS are automatically opened by issuing a SELECT statement. But the EXPLICIT cursors are to be opened using OPEN, fetching is done using FETCH and closing
using CLOSE.

42. What is the difference between ROWID and ROWNUM ?
ROWID is the logical address of the row, whereas ROWNUM returns the sequence no. in which the row was retrieved when first feched from a table.

43. What is the RESULT of the statement ?
SELECT EMPNO, NAME,SAL FROM EMP WHERE ROWNUM >2; Result : 0, No rows will be selected.