Listing Columns and Indexes in Reality

Listing the Columns in a Table

The TCL command LIST-SQL-COLUMNS generates a listing of columns defined in a specified table (equivalent to DESCRIBE TABLENAME command available to ORACLE users). Without arguments, LIST-SQL-COLUMNS lists details of columns in all tables.

To list columns for a particular table, you must specify the table name:

:LIST-SQL-COLUMNS EMP
Page   1                                     14:45:11  10 Jan 1999
Table......  Column........  Type......  Prec   Scale Attr# Value Subvalue
EMP          COMM          DECIMAL        7     2     6
EMP          DEPTNO        INTEGER       10           7
EMP          EMPNO         INTEGER       10           0
EMP          ENAME         CHAR          10           1
EMP          HIREDATE      DATE          10           4
EMP          MGR           INTEGER       10           3
EMP          SAL           DECIMAL        7     2     5
EMP          TITLE         CHAR           9           2
8 Items listed....

Note

Prior to Reality V12.0, this command was called LISTCOLUMNS.

Listing the Indexes for a Table

The LIST-SQL-INDEXES command generates a listing of indexes defined for a named table. Without arguments, LIST-SQL-INDEXES lists details of indexes for all tables. To list the indexes for a particular table, you must include the table name as an argument:

:LIST-SQL-INDEXES EMP
Page    1                                            16:51:12  27 Jan 1999
Table.........  Index.........  Index.  Duplicates Column......... Collation
                                Type    Allowed    Names
EMP                             Table
EMP              IID            Hashed         N   EMPNO
EMP              HX             Other          Y   HIREDATE         Asc
***
3 Items listed.

Note

Prior to Reality V12.0, this command was called LISTINDEXES.