1.

What is the use of WHEN clause in PL/SQL?

Answer»

In PL/SQL, packages are the schema objects that groups logically related PL/SQL types and variables. A Package has the following two PARTS:

  • Package Specification

The specification has the information about the package content. It declares the types, variables, constant, cursors, etc. It EXCLUDES the CODE for subprograms. The objects in the specification are the public OBJECT, however, a subprogram not part of the specification is a private object.

  • Package Body

The Package Body has the implementation of subprogram declared in the specification. To create Package Body, use the CREATE PACKAGE BODY statement.

The following are the guidelines:

  • You need to design and define the package specifications before the package bodies.
  • Declare public cursors in package specifications and define them in package bodies.
  • Assign initial values in the initialization part of the package body. Avoid this in declarations.


Discussion

No Comment Found