SHOW TABLEs
SHOW TABLEs [name]
This command lists all user-defined tables in the database if the first form of the command is used, or displays the columns and data types or domains of the table if the second form is used.
SQL> show tables; COUNTRY CUSTOMER ... SQL> show table country; COUNTRY (COUNTRYNAME) VARCHAR(15) Not Null CURRENCY VARCHAR(10) Not Null CONSTRAINT INTEG_2: Primary key (COUNTRY)
You will note that if there are comments defined for a table, this command will not display them.You must use the [isql-show-comments] command, but be aware that you will then be given all comments in the database.There is no command to extract the comments for a single object, unless you query the system tables directly.
SQL> comment on table country is 'This table holds details about countries.'; SQL> commit; SQL> show comments; ... COMMENT ON TABLE COUNTRY IS This table holds details about countries.; ... SQL> show table country; COUNTRY (COUNTRYNAME) VARCHAR(15) Not Null CURRENCY VARCHAR(10) Not Null CONSTRAINT INTEG_2: Primary key (COUNTRY) SQL> select rdb$description CON> from rdb$relations CON> where rdb$relation_name = 'COUNTRY'; RDB$DESCRIPTION ================= 6:1e7 ============================================================================== RDB$DESCRIPTION: This is a table holding details about countries. ==============================================================================
The output from the final query above is not ideal, but at least it’s much less displayed information when there are lots of comments in your database.