The name of an object is usually defined when the object itself is defined using the appropriate SQL statement. The name has then been introduced and the object can be referenced using this name in any subsequent statements.
The table below illustrated how the various names can be defined or declared:
SQL object | SQL statement or part of statement |
database (catalog) | CREATE CATALOG (utility statement) |
Schema | CREATE SCHEMA |
TABLE |
|
Column | CREATE TABLE, ALTER TABLE |
Integrity constraint | CONSTRAINT clause in |
Index | CREATE INDEX |
Routine |
|
Storage group | CREATE STOGROUP |
Space | CREATE SPACE |
Authorization identifier | CREATE USER |
cursor | DECLARE CURSOR |
statement identifier | PREPARE |
Table 11: Defining names