SQL/MP Reference Manual

HP NonStop SQL/MP Reference Manual523352-013
T-2
TABLES Table
By default, SQL automatically opens partitions of tables and indexes as they are
needed. You can, however, use the CONTROL TABLE statement with the OPEN ALL
option to open all indexes and base partitions of a table the first time a partition is
accessed.
For more information about tables, see CREATE TABLE Statement on page C-154.
TABLES Table
The TABLES table is a catalog table that contains information about tables, views, and
collations. It contains a row for each table, view, and collation in the catalog, including
itself and other catalog tables.
Table T-1 describes the contents of the TABLES table.
Note. Use the CONTROL TABLE OPEN ALL statement with the OPEN ALL option only if all
these are true:
All open activities must occur when the program starts (add a dummy call to the cursor
during initialization).
The object containing the cursor eventually accesses all partitions.
The plan for the cursor is not a parallel plan.
Table T-1. The TABLES Table (page 1 of 2)
Column Name Data Type Description
1 TABLENAME* CHAR(34) Name of table, view, or collation
2 TABLETYPE CHAR(2) TA if table
VI if view
CP if collation
3 TABLECODE SMALLINT
UNSIGNED
Code for type of table. Codes 100-999
indicate reserved for HP use. Other numbers
are values of the TABLECODE file attribute
4 COLCOUNT SMALLINT
SIGNED
Number of columns in table or view
5 GROUPID SMALLINT
UNSIGNED
Group number of owner's user ID
6 USERID SMALLINT
UNSIGNED
User number of owner's user ID
7 CREATETIME LARGEINT
SIGNED
Julian timestamp from table creation
8 REDEFTIME LARGEINT
SIGNED
Julian timestamp from alteration that
invalidated dependent programs (updated by
UPDATE STATISTICS)
9 SECURITYVECTOR CHAR(4) Security string for table, view, or collation