SQL/MX 2.x Installation and Management Guide (G06.24+, H06.03+)

Querying SQL/MX Metadata
HP NonStop SQL/MX Installation and Management Guide523723-004
8-34
Displaying the Attributes of a Table
Displaying the Attributes of a Table
This example displays some of the attributes of the base tables defined in the
SAMDBCAT.SALES schema:
>> set schema samdbcat.definition_schema_version_1200;
--- SQL operation complete.
>> select substring(object_name, 1, 15) as TABLENAME,
case object_security_class
when 'UM' then 'USER METADATA TABLE'
when 'UT' then 'USER-DEFINED TABLE'
when 'SM' then 'SYSTEM METADATA TABLE'
when 'MU' then 'OTHER'
end as SECURITY_CLASS,
create_time,
object_owner as owner
from objects
where object_type = 'BT'
and schema_uid =
(
select schema_uid
from nonstop_sqlmx_figaro.system_schema.schemata
where
schema_name = 'SALES' and
cat_uid =
(select cat_uid
from nonstop_sqlmx_figaro.system_schema.catsys
where cat_name = 'SAMDBCAT'
)
)
for read uncommitted access
order by object_name;
TABLENAME SECURITY_CLASS CREATE_TIME OWNER
--------------- --------------------- -------------------- -----------
CUSTOMER USER-DEFINED TABLE 211943361412329581 65535
HISTOGRAMS USER METADATA TABLE 211943361392541122 65535
HISTOGRAM_INTER USER METADATA TABLE 211943361392541122 65535
MVS_TABLE_INFO_ OTHER 211943361392541122 65535
MVS_UMD OTHER 211943361392541122 65535
MVS_USED_UMD OTHER 211943361392541122 65535
ODETAIL USER-DEFINED TABLE 211943361418564086 65535
ORDERS USER-DEFINED TABLE 211943361413122343 65535
PARTS USER-DEFINED TABLE 211943361419190872 65535