Skip to main content

Schema, table and columns

All objects belong to a SQL schema, which ensures a conflict-free namespace for accessing them and a focus for user authorization. The schema contains tables and views administered.

SYS.SCHEMAS
name type references description
"id" INTEGER   The internal identifier for the schema.
"name" VARCHAR   The SQL name.
"authorization" INTEGER   The identifier associated with the authorization.
"owner" INTEGER   The reference to the owner of this schema.
SYS.TABLES
name type references description
SYS._TABLES
"id" INTEGER   The internal identifier for the table
"name" VARCHAR   The SQL name.
"schema_id" INTEGER sys.schemas.id The schema identifier.
"query" VARCHAR   The query to populate a view.
"type" SMALLINT   0=Table/1=View/2=Generated.
"system" BOOLEAN   Is it a system table.
"commit_action" SMALLINT   Clean up.
"readonly" BOOLEAN   Table can only be queried.
"temporary" TINYINT   Retention period indicator; session or persistent.
SYS.COLUMNS
name type references description
SYS._COLUMNS
"id" INTEGER   The internal identifier for the column
"name" VARCHAR   The SQL name.
"type" VARCHAR   The SQL type name.
"type_digits" INTEGER   The number of digits for number types.
"type_scale" INTEGER   The precision after decimal point.
"table_id" INTEGER sys.tables.id The table this column belongs to
"default" VARCHAR   The default lexical value.
"null" BOOLEAN   Nulls are allowed constraint.
"number" INTEGER   Position in the underlying table.
"storage_type" VARCHAR   Internal storage class identifier.