PL/SQL INTERVIEW QUESTION & ANSWERS
36. |
What are subprograms? |
|
The PL/SQL programs can be stored in the database as stored programs and can be invoked whenever required. This also provide security and integrity control by allowing access on the sub programs and not on the database objects directly. Actually subprograms are named PL/SQL blocks that can take parameters and be invoked. |
37. |
What are the types of subprograms in PL/SQL? |
|
PL/SQL has two types of subprograms, procedures and functions. Generally, you use a procedure to perform an action and a function to compute a value. |
38. |
What are the advantages of subprograms? |
|
- Provides extensibility
- Provides modularity
- Promotes reusability and manageability
|
39. |
What is a PL/SQL Record? |
|
A record is a group of related data items stored in fields, each with its own name and
datatype. You can think of a record as a variable that can hold a table row, or some columns from a table row. The fields correspond to table columns. |
40. |
What are the types of explicit cursor attributes? |
|
There are four cursor attributes are : - ‰NOTFOUND
- ‰FOUND
- ‰ROWCOUNT
- ‰ISOPEN
. It can be used in the procedural statements but not in SQL statements.
|