Skip to main content

INFORMATION.SCHEMA.TABLES

Class INFORMATION.SCHEMA.TABLES Extends %Library.Persistent [ ClassType = persistent, Final, Owner = {_PUBLIC}, SqlRowIdPrivate, SqlTableName = TABLES, StorageStrategy = SQLStorage, System = 4 ]

Returns one row for each table in the current namespace for which the current user has privileges.

Parameters

READONLY

Parameter READONLY = 1;

Properties

SchemaExact

Property SchemaExact As %String(MAXLEN = 128) [ Internal, Private, Required, SqlColumnNumber = 20 ];

TableExact

Property TableExact As %String(MAXLEN = 128) [ Internal, Private, Required, SqlColumnNumber = 21 ];

SystemTable

Property SystemTable As %Integer [ Calculated, Internal, Private, Required, SqlColumnNumber = 22, SqlComputeCode = { set {*}=$s($e({TABLE_SCHEMA})="%"||({TABLE_SCHEMA}="INFORMATION_SCHEMA"):1,1:0) }, SqlComputed ];

Is the table a system table (1 or 0)

TABLECATALOG

Property TABLECATALOG As %String(MAXLEN = 128) [ Calculated, SqlColumnNumber = 2, SqlComputeCode = { set {*}=""}, SqlComputed, SqlFieldName = TABLE_CATALOG ];

Table qualifier - always NULL in InterSystems IRIS.

TABLESCHEMA

Property TABLESCHEMA As %String(COLLATION = "Upper", MAXLEN = 128) [ Required, SqlColumnNumber = 3, SqlFieldName = TABLE_SCHEMA ];

Name of schema that contains the table.

TABLENAME

Property TABLENAME As %String(COLLATION = "Upper", MAXLEN = 128) [ Required, SqlColumnNumber = 4, SqlFieldName = TABLE_NAME ];

Name of the table.

TABLETYPE

Property TABLETYPE As %String(COLLATION = "SqlUpper", MAXLEN = 16, VALUELIST = ",BASE TABLE,VIEW,GLOBAL TEMPORARY,LOCAL TEMPORARY,SYSTEM TABLE,SYSTEM VIEW,FOREIGN TABLE") [ Required, SqlColumnNumber = 5, SqlFieldName = TABLE_TYPE ];

The values of TABLE_TYPE have the following meanings:

  • BASE TABLE - The table being described is a persistent base table.
  • SYSTEM TABLE - The table being described is a system persistent base table.
  • FOREIGN TABLE - The table being described is a foreign table, projecting data external to IRIS.
  • VIEW - The table being described is a viewed table.
  • SYSTEM VIEW - The table being described is a viewed table.
  • GLOBAL TEMPORARY - The table being described is a global temporary table.
  • LOCAL TEMPORARY - The table being described is a created local temporary table.

SELFREFERENCINGCOLUMNNAME

Property SELFREFERENCINGCOLUMNNAME As %String(MAXLEN = 3) [ Calculated, SqlColumnNumber = 6, SqlComputeCode = { set {*}="" }, SqlComputed, SqlFieldName = SELF_REFERENCING_COLUMN_NAME ];

From the standard:

_The value of SELFREFERENCINGCOLUMNNAME is the name of the self-referencing column of the table, if the table is a typed table. 		Otherwise, the value of SELFREFERENCINGCOLUMNNAME is the null value._

Since InterSystems IRIS does not currently support typed table (see IS_TYPED), SELF_REFERENCING_COLUMN_NAME is always NULL

REFERENCEGENERATION

Property REFERENCEGENERATION As %String(MAXLEN = 16, VALUELIST = ",SYSTEM GENERATED,USER GENERATED,DERIVED") [ Calculated, SqlColumnNumber = 7, SqlComputeCode = { set {*}="" }, SqlComputed, SqlFieldName = REFERENCE_GENERATION ];

From the Standard:

_The values of REFERENCEGENERATION have the following meanings: 		SYSTEM GENERATED - The values of the self-referencing column of the table are generated by the SQL-server. 		USER GENERATED   - The values of the self-referencing column of the table are generated by the user. 		DERIVED          - The values of the self-referencing column of the table are generated from columns of the table. 		null             - The table being described does not have a self-referencing column._

Since InterSystems IRIS does not support self-referencing columns, REFERENCE_GENERATION is always null.

USERDEFINEDTYPECATALOG

Property USERDEFINEDTYPECATALOG As %String(MAXLEN = 3) [ Calculated, SqlColumnNumber = 8, SqlComputeCode = { set {*}="" }, SqlComputed, SqlFieldName = USER_DEFINED_TYPE_CATALOG ];

From the standard:

_If the table being described is a table of a structured type TY, then the values of USERDEFINEDTYPECATALOG, USERDEFINEDTYPESCHEMA, and USERDEFINEDTYPENAME 	are the fully qualified name of TY; otherwise, the values of USERDEFINEDTYPECATALOG, USERDEFINEDTYPESCHEMA, and USERDEFINEDTYPENAME are the null value._

For InterSystems IRIS, USER_DEFINED_TYPE_CATALOG is always NULL.

USERDEFINEDTYPESCHEMA

Property USERDEFINEDTYPESCHEMA As %String(MAXLEN = 3) [ Calculated, SqlColumnNumber = 9, SqlComputeCode = { set {*}="" }, SqlComputed, SqlFieldName = USER_DEFINED_TYPE_SCHEMA ];

For InterSystems IRIS, USER_DEFINED_TYPE_SCHEMA is always NULL.

USERDEFINEDTYPENAME

Property USERDEFINEDTYPENAME As %String(MAXLEN = 3) [ Calculated, SqlColumnNumber = 10, SqlComputeCode = { set {*}="" }, SqlComputed, SqlFieldName = USER_DEFINED_TYPE_NAME ];

For InterSystems IRIS, USER_DEFINED_TYPE_NAME is always NULL.

ISINSERTABLEINTO

Property ISINSERTABLEINTO As %String(MAXLEN = 3) [ Calculated, Required, SqlColumnNumber = 11, SqlComputeCode = {new tExtent

The values of IS_INSERTABLE_INTO have the following meanings:

  • YES - The table being described is insertable-into.
  • NO - The table being described is not insertable-into.

ISTYPED

Property ISTYPED As %String(MAXLEN = 3) [ Calculated, SqlColumnNumber = 12, SqlComputeCode = { set {*}="NO" }, SqlComputed, SqlFieldName = IS_TYPED ];

From the standard:
A table RT whose row type is derived from a structured type ST is called a typed table. Only a base table or a view can be a typed table. A typed table has columns corresponding, in name and declared type, to every attribute of ST and one other column REFC that is the self-referencing column of RT; let REFCN be the of REFC. The declared type of REFC is necessarily REF(ST) and the nullability characteristic of REFC is known not nullable. If RT is a base table, then the table constraint "UNIQUE(REFCN)" is implicit in the definition of RT. A typed table is called a referenceable table. A self-referencing column cannot be updated. Its value is determined during the insertion of a row into the referenceable table. The value of a system-generated self-referencing column and a derived self-referencing column is automatically generated when the row is inserted into the referenceable table. The value of a user-generated self-referencing column is supplied as part of the candidate row to be inserted into the referenceable table. InterSystems IRIS does not currently support typed tables, therefore IS_TYPED is always NO.

Classname

Property Classname As %String(MAXLEN = 254) [ Calculated, SqlColumnNumber = 13, SqlComputeCode = { set {*}=$lg($g(^rINDEXSQL("rv",$zconvert({TABLE_SCHEMA},"U"),$zconvert({TABLE_NAME},"U"))),1) }, SqlComputed, SqlFieldName = CLASSNAME ];

Name of the class that projected this table

Description

Property Description As %String(MAXLEN = 254) [ Calculated, SqlColumnNumber = 14, SqlComputeCode = { set {*}=$lg($g(^rINDEXSQL("TABLE",{SchemaExact},{TableExact})),5) }, SqlComputed, SqlFieldName = DESCRIPTION ];

Table's description

Owner

Property Owner As %String(MAXLEN = 254) [ Calculated, SqlColumnNumber = 15, SqlComputeCode = { set {*}=$lg($g(^rINDEXSQL("rv",$zconvert({TABLE_SCHEMA},"U"),$zconvert({TABLE_NAME},"U"))),6) }, SqlComputed, SqlFieldName = OWNER ];

Table's owner

ISSHARDED

Property ISSHARDED As %String(MAXLEN = 3) [ Calculated, SqlColumnNumber = 16, SqlComputeCode = { new tExtent