PL/SQL INTERVIEW QUESTION & ANSWERS
51. |
What is row operator? |
|
Row operators return or reference particular rows. ALL retains duplicate rows in the
result of a query or in an aggregate expression. DISTINCT eliminates duplicate rows from the result of a query or from an aggregate expression. PRIOR refers to the parent row of the current row returned by a tree-structured query.
|
52. |
What is the difference between accessor and mutator methods? |
|
- Accessor methods are member functions that exist primarily to enable you to retrieve specific attribute values from an object.
- Mutator methods are member procedures
that enable you to set the value of a specific attribute or set of attributes.
- Using accessor and mutator methods helps insulate your code from changes to an object’s underlying implementation.
|
53. |
What is an exception? |
|
In PL/SQL a warning or error is called an exception. Exceptions can be internally defined or used defined.
|
54. |
What are the types of PL/SQL comments? |
|
PL/SQL supports two comment styles :- Single–Line Comments : Single–line comments begin with a double hyphen (--) anywhere on a line and extend
to the end of the line.
- Multi–line Comments : Multi–line comments begin with a slash-asterisk (/*) end with an asterisk-slash (*/) and can span multiple lines.
|
55. |
What is a mutating table? |
|
A mutating table is one that is in the process of being modified by the SQL statement
which fired a trigger. Because the table is being changed it is not in a consistent state and Oracle does not allow queries against it. |