You use an SQLCLI command to request information about the database catalog of a database in interactive mode.
Note
For information about the other options for executing SQLCLI commands, see Executing Commands.
Enter one of the SQLCLI commands listed below.
SQLCLI returns information about the database objects that correspond to the specified [PATTERN] or [NAME] and to which you have access. If you do not specify a pattern, the system displays information about all the database objects to which you have access.
Database Object |
SQLCLI Command |
Result |
---|---|---|
Column |
\dc [PATTERN] |
|
Index |
\de [PATTERN] |
|
Database Procedure |
\dp [PATTERN] |
|
Schema |
\ds [NAME] |
|
Table |
\dt [PATTERN] |
|
Database users |
\du [NAME] |
|
View |
\dv [PATTERN] |
|
The following syntax applies to the [PATTERN]:
Property |
Description |
---|---|
PATTERN |
[OWNER.][OBJECT_NAME] or [SCHEMA.][OBJECT_NAME] |
OWNER |
Owner of the database objects about which you want to request information |
SCHEMA |
Schema of the database objects about which you want to request information |
OBJECT_NAME |
Name of the database object |
You can use the following placeholders:
For one character: _
For any number of characters: %
Requesting information on the columns in the HOTEL.CUSTOMER table:
\dc HOTEL.CUSTOMER
Table "HOTEL.CUSTOMER"
Column Name | Type | Length | Nullable | KEYPOS
------------+------------+--------+----------+-------
ADDRESS | CHAR ASCII | 25 | NO |
CNO | FIXED | 4 | NO | 1
FIRSTNAME | CHAR ASCII | 10 | YES |
NAME | CHAR ASCII | 10 | NO |
TITLE | CHAR ASCII | 7 | YES |
ZIP | CHAR ASCII | 5 | YES |
(6 rows selected)