HP (Hewlett-Packard) 544530-001 Computer Accessories User Manual


 
“Showing the Views in a Schema” (page 57)
“Showing the Synonyms in a Schema” (page 57)
Showing the Schemas
The SHOW SCHEMAS command displays the schemas that exist in the default catalog:
SQL>show schemas
SCHEMA NAMES
-----------------------------------------------------------------------------
DBA001 DBA082 DBMGR
DBSCRIPT_SALES DEFINITION_SCHEMA_VERSION_1200 DEMOSCH
DEMOSCH1 DEMOSCH2 DEMO_SCH
DEV060525 DS_SCH D_SALES
HMGR HPNVS HPNVSSCH
HPNVS_SAMPLE HPNVS_SAMPLE INVENT
ODBC_INVENT ODBC_PERSNL ODBC_SALES
ODBC_SCHEMA ODBC_TEST PERSNL
PUBLIC_ACCESS_SCHEMA ROLEDBA ROLEMGR
ROLEUSER SALES SCH
SERVICES T4JDBC_SCHEMA TEST1
USR
SQL>
For more information, see the “SHOW SCHEMAS Command” (page 120).
Showing the Tables in a Schema
The SHOW TABLES command displays the tables that exist in the current schema. For example,
this SHOW TABLES command displays all the tables in the current schema, PERSNL:
SQL>show schema
SCHEMA PERSNL
SQL>show tables
TABLE NAMES
----------------------------------------------------------------
DEPT EMPLOYEE JOB PROJECT
SQL>
For more information, see the “SHOW TABLES Command” (page 127).
Showing the Dependent Objects of a Table
The SHOW TABLE command displays information about the indexes, materialized views, or
synonyms of a specified table. For example, this SHOW TABLE command with the INDEXES
option displays information about each index of the EMPLOYEE table:
SQL>show table persnl.employee, indexes
COLUMN NAME ORDER INDEX TYPE UNIQUE CARDINALITY POSITION
------------------------------- ----- ---------- ------ ----------- --------
Index 1 :EMPLOYEE
-----------------
EMPNUM ASC Other Yes 0 1
Index 2 :XEMPDEPT
-----------------
DEPTNUM ASC Other No 0 1
Index 3 :XEMPNAME
-----------------
LAST_NAME ASC Other No 0 1
FIRST_NAME ASC Other No 0 2
56 Running Commands Interactively in the Neoview Script Interface