LIST (Short Name: LIS)
Top  Previous  Next

Use the LIST command to display or print information about a database.

list

Options

ALL
Displays by table the column numbers, column names, data types, sizes, indexes, autonumbering status, expressions for computed columns, default values, column descriptions, table description, and row count for each table in the open database. A blank line wil be inserted between each table.

CASCADE
Displays a list of tables with the CASCADE flag, and the type of flag; UPDATE, DELETE, or BOTH.

COLUMNS

Displays the name, data type, size, table name, index status, autonumbering status, expression, any default value, and description for each column in the open database.

If you specify part of a column name followed by a wildcard character, R:BASE will only show the column names that match that pattern.

COLUMN colname

Displays the name, data type, size, table name, index status, autonumbering status, expression, any default value, and description for the column that you enter in every table.

CONSTRAINTS

Displays the name, type, table name, and referenced table for each constraint in the database.

CONSTRAINTS FOR tblname

Specifies a table name for which to list constraints.

CURSORS

Specifies the status of cursors and cursor definitions.

DATABASES

Lists all databases in the current directory.

FKEYS
Displays the key ID number, the type of key (foreign), the table name the key is located in, and the table that the foreign key references.

FKEYS FOR tblname
Displays the key ID number, the type of key (foreign), the column name of the foreign key in the specified table, the table name that the foreign key references, and the column name that the foreign key references.   

FORMS

Displays the name, driving table or view, and description for every form in the open database.

FORMS FOR tblname

Displays the name, driving table or view, and description for all forms defined for tblname.

INDEXES

Displays the name, table name, and column names for all indexes in the open database.

INDEXES FOR tblname

Displays the name, table name, column names, data types, orders, and sizes for all indexes defined for tblname.

INDEXES indexname

Displays the name, table name, column names, data types, orders, and sizes for indexname.

LABELS

Displays the name, driving table or view, and description for every label in the open database.

LABELS FOR tblname

Displays the name, driving table or view, and description for all labels defined for tblname.

PKEYS
Displays the key ID number, the type of key (primary) and if it is referenced in another table, the table name the key is located in.

PKEYS FOR tblname
Displays the key ID number, the type of key (primary), the column name of the primary key in the specified table, the table name that references the primary key, and the column name that references the primary key.

PROCEDURE

Displays the name and description for every procedure in the open database.

PROCEDURE procname

Displays the name, description, ID, date last modified, version, locked by (if locked) and return type for the specified procedure. Also, if the procedure was stored with parameters, the number of parameters, names and descriptions will be displayed.

REPORTS

Displays the name, driving table or view, and description for every report in the open database.

REPORTS FOR tblname

Displays the name, driving table or view, and description for all reports defined for tblname.

RULES

Displays whether rules checking is set on or off, the table name, whether the conditions in the WHERE clause must be met, the rule message, and the WHERE clause for every rule in the open database.

SYS_%

Displays a summary of system tables and views.

TABLES

Displays the database name, table name, number of columns, number of rows for each table in the open database, and lists all views, attached dBASE files, and attached foreign server tables. In addition, the LIST TABLES command shows the number of tables, columns, and indexes in the database. These numbers all include system tables. Temporary tables in a read-only schema mode are displayed dimmed. (For more information about the read-only scheme mode, see the "SET STATICDB" entry.) When you enter the LIST command by itself, R:BASE executes the LIST TABLES command.

TABLES SYS_%

Displays a detailed list of system tables and views.

TABLES tblname

Displays the name and description of the table, table number, name, data type, size, index status, autonumbering status, expression, default value, description, constraints, and index types for each column in the table. Columns are displayed in the order they were defined. The same output is displayed if you enter LIST tblname as a command.

TRIGGERS

Displays all of the tables that have triggers and their triggers in the open database.

TRIGGERS FOR tblname

Displays the triggers for the specified table.

UKEYS
Displays the key ID number, the type of key (unique), and the table name the key is located in.

UKEYS FOR tblname
Displays the key ID number, the type of key (unique), and the column name the unique key is assigned to.

VIEWS

Displays the database name and the names of all the views in the open database. Temporary views in read-only schema mode are dimmed.

VIEWS viewname

Displays the name and the SELECT clause defined for the view.


About the LIST Command

If the LIST command is entered without any options, R:BASE executes the LIST TABLES command. Column numbers that are displayed with the LIST command can be entered in other commands instead of column names. The total number of tables and columns listed includes R:BASE system tables (of which some are hidden) and their associated columns.

When a table has a LOCK on it, the LIST command will display "(L)" in front of the table name.

When a table is a TEMPORARY table, the LIST command will display "(T)" in front of the table name.


Database Access Rights with LIST
Before using the LIST command, enter the correct user identifier with the CONNECT or SET USER command.

When access rights have been assigned to a user with the GRANT command, R:BASE displays only those tables, columns, and views for which the user has been granted access.

In a multi-user environment, locked tables are displayed in reverse video when the LIST command is run. When you run the LIST TABLE tblname command, R:BASE tells you if the lock is an edit, cursor, local, or remote lock.

Example

Column numbers that are displayed with the LIST command can be entered in other commands instead of column names. The following command would display the first column, custid, in the customer table.

SELECT #1 FROM customer