Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Defining names

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
Base table
View
Correlation


CREATE TABLE
CREATE VIEW
Table specification in query expression

Column

CREATE TABLE, ALTER TABLE
CREATE VIEW, query expression

Integrity constraint

CONSTRAINT clause in
CREATE TABLE, ALTER TABLE

Index

CREATE INDEX

Routine
Procedure
User Defined Function (UDF)


CREATE PROCEDURE
CREATE FUNCTION

Storage group

CREATE STOGROUP

Space

CREATE SPACE

Authorization identifier

CREATE USER

cursor

DECLARE CURSOR

statement identifier

PREPARE

Table 11: Defining names