SQL/MX 3.2 Management Manual (H06.25+, J06.14+)

Table Of Contents
and o.object_name = 'CUSTOMER'
and o.schema_uid =
(select schema_uid
from nonstop_sqlmx_<sys name>.system_schema.schemata
where
schema_name = 'SALES' and
cat_uid =
(select cat_uid
from nonstop_sqlmx_<sys name>.system_schema.catsys
where cat_name = 'SAMDBCAT'
)
)
for read uncommitted access;
DROPPABLE
---------
TYPE
-----------
TABLE_UID
--------------------
CONSTRAINT_UID
--------------------
N
N
CHECK
PRIMARY KEY
1950548695248899591
1950548695248899591
1950548695248911751
1950548695248913034
Displaying Column Information
Topics in this subsection:
“Displaying all Columns in a Table” (page 138)
“Displaying all Columns in a View” (page 139)
“Displaying all Columns in an Index” (page 139)
“Displaying all Columns in a Primary Key or Unique Constraint” (page 140)
“Displaying all Columns in a NOT NULL Constraint” (page 141)
“Displaying all Columns in a Referential Integrity Constraint” (page 142)
“Displaying the Attributes of a Column” (page 142)
“Displaying all Tables Containing a Selected Column” (page 143)
Related topic:
“Displaying all Privileges for a Column” (page 146)
The COLS table, located in the schema DEFINITION_SCHEMA_VERSION_version-number of
each catalog, describes the columns in all tables and views in that catalog. For more information
about all metadata tables, see Figure 3 (page 108) in this manual or the SQL/MX Reference Manual.
All queries for information about columns must access information from the CATSYS, SCHEMATA,
and OBJECTS tables, and from other appropriate tables, such as the COLS table.
You can also use the MXCI SHOWDDL command to display the approximate CREATE TABLE
statement that might have created the columns in that table. For examples of the SHOWDDL
command, see the SQL/MX Reference Manual.
Displaying all Columns in a Table
This example displays all columns in the table SAMDBCAT.PERSNL.EMPLOYEE:
>> set schema samdbcat.definition_schema_version_<schema version>;
--- SQL operation complete.
>> select substring(column_name, 1, 25) as column_name,
column_number
from cols c, objects o
where
c.object_uid = o.object_uid and
o.object_name = 'EMPLOYEE' and
o.object_type = 'BT' and
138 Querying SQL/MX Metadata