A qualifier is a name that specifies the owner or context of an entity that is the object of the qualification. A qualified object is specified as the qualifier name followed by a dot with no intervening white space, followed by the name of the object being qualified with no intervening white space. This syntax is called dot notation.

The syntax of a qualified object is as follows:

qualifier. [ qualifier. ]... object

qualifier is the name of the object owner. object is the name of the entity that belongs to qualifier. There can be a chain of qualifications where the preceding qualifier owns the entity identified by the subsequent qualifiers and object.

Almost any identifier can be qualified. What an identifier is qualified by depends on what the identifier represents and the context of its usage.

The following content shows examples of qualification:

  • Procedure and function names qualified by the schema to which they belong, such as schema_name.procedure_name (...).
  • Trigger names qualified by the schema to which they belong, such as schema_name.trigger_name.
  • Column names qualified by the table to which they belong, such as emp.empno.
  • Table names qualified by the schema to which they belong, such as public.emp.
  • Column names qualified by table and schema, such as public.emp.empno.

Generally, wherever a name appears in the syntax of an SPL statement, its qualified name can be used as well. A qualified name would only be used if there is ambiguity associated with the name. For example, if two procedures with the same name belonging to two different schemas are invoked from within a program or if the same name is used for a table column and SPL variable within the same program.

You must avoid using qualified names. This topic uses the following conventions to avoid naming conflicts:

  • All variables declared in the declaration section of an SPL program are prefixed by v_, such as v_empno.
  • All formal parameters declared in a procedure or function definition are prefixed by p_, such as p_empno.
  • Column names and table names do not have any special prefix conventions, such as column empno in table emp.