Please enable JavaScript to view this site.

R:BASE 11 Help

Navigation: Command Index > L

LIST (Short Name: LIS)

Scroll Prev Top Next More

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 will be inserted between each table.

 

ASC

Specifies to sort the information output alphabetically in ascending order.

 

AUTONUM

Displays the column name, table name, and attributes for each autonumbered column in the database.

 

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.

 

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. 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 QUALKEYS

Displays the column name, table name, and attributes for each QualKey column in the database.

 

COMPUTED

Displays the column name, table name, and attributes for each computed column in the database.

 

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, including the date/time stamp when the database was last opened, the last data modification date/time stamp, and the last schema modification date/time stamp.

 

dBASE

Lists all dBASE tables attached to the database.

 

DEFAULT

Displays the column name, table name, and attributes for each column with a default value definition in the database.

 

DES

Specifies to sort the information output alphabetically in descending order.

 

FKEYS

Displays all defined foreign keys detailing the key ID number, type of key (foreign), table name the key is located in, column name of the foreign key in the table, table name the foreign key references, and the column name the foreign key references.

 

FKEYS FOR tblname

Displays all defined foreign keys for a table  detailing the key ID number, type of key (foreign), table name the key is located in, column name of the foreign key in the specified table, table name the foreign key references, and the column name that the foreign key references.

 

FORMS

Displays the name, driving table or view, description, date/time stamp, and version for every form in the open database.

 

FORMS formname

Displays the name, driving table or view, description, date/time stamp, and version for formname. If you specify part of a form name followed by a wildcard character, R:BASE will only show the form names that match that pattern.

 

FORMS FOR tblname

Displays the name, driving table or view, description, date/time stamp, and version for all forms defined for tblname.

 

FUNCTIONS

Displays all defined DLL functions.

 

INDEXES

Displays all defined indexes detailing the name, table name, column name(s), and if the entry is a Not NULL index.

 

INDEXES FOR tblname

Displays all defined indexes for a table detailing the name, table name, if the entry is a Not NULL index, column name(s), data types, orders, and sizes.

 

INDEXES indexname

Displays the name, table name, if the entry is a Not NULL index, column name(s), data types, orders, and sizes for an index name.

 

LABELS

Displays the name, driving table or view, description, date/time stamp, and version for every label in the open database.

 

LABELS labelname

Displays the name, driving table or view, description, date/time stamp, and version for labelname. If you specify part of a label name followed by a wildcard character, R:BASE will only show the label names that match that pattern.

 

LABELS FOR tblname

Displays the name, driving table or view, description, date/time stamp, and version for all labels defined for tblname.

 

LOCK

Lists all locked tables within the database.

 

PKEYS

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

 

PKEYS FOR tblname

Displays all defined primary keys for a table detailing the key ID number, type of key (primary), column name of the primary key in the specified table, 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, description, date/time stamp, and version for every report in the open database.

 

REPORTS reportname

Displays the name, driving table or view, description, date/time stamp, and version for reportname. If you specify part of a report name followed by a wildcard character, R:BASE will only show the report names that match that pattern.

 

REPORTS FOR tblname

Displays the name, driving table or view, description, date/time stamp, and version 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.

 

RULES FOR tblname

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 all rules defined for tblname.

 

SERVER

Lists all Server tables attached to the database.

 

SYS_%

Displays a summary of system tables and views.

 

TABLES

The LIST TABLES command shows the database comment, number of tables, columns, indexes, views, stored procedures, forms, reports, and labels in the database, followed by the number of users connected, the last data modification date/time stamp, and the last schema modification date/time stamp. Then, the LIST command 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. These numbers all include system tables. LIST displays locked tables with a letter next to the table name for the type of multi-user lock.

 

(L) for a local lock

(R) for a remote lock

(C) for a cursor lock

(r) for a row lock

 

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.

 

TEMP

Lists all temporary tables for the database.

 

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. The list displays the view name, number of columns, comment in the open database, along with the table(s)/view(s) that the view is based upon. Temporary views will display a "(T)" in front of the view name.

 

VIEWS viewname

Displays the name and the SELECT clause defined for the view. If you specify part of a view name followed by a wildcard character, R:BASE will only show the name and the SELECT clause that match that pattern.

 

About the LIST Command

If the LIST command is entered without any options, R:BASE executes the LIST TABLES command. 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.

 

You can use wildcards to display objects that match a specific pattern.

 

Column numbers (#1, #2, etc.) 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

 

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.

 

Examples

 

Example 01.

-- The following lists tables in a database

 

LIST TABLES

 

Number of Tables in Database RRBYW20 is 81.

Number of Columns in Database RRBYW20 is 355.

Number of Indexes in Database RRBYW20 is 57.

Number of users connected: 1.

Last database modification: 12/06/2022 04:09 PM

Last schema modification: 12/06/2022 03:03 PM

  Tables in the Database RRBYW20

 

  Name                Columns      Rows   Comments

  ------------------- ------- ---------   ------------------------------------

  BonusRate                 3        14   Rates for Bonuses

  Component                 2        12   Component Identification Number and

                                          Description

  CompUsed                  2        22   Components Used in a Model

  Contact                  12        36   Customer Contact Information

  ContactCallNotes          5         3   Contact Call Notes

  Customer                 17        30   Customer Information

  Departments               8        31   Departments

  Employee                 18        12   Employee Information

  FormTable                 1         1   Dummy Table for Forms

  HourlyTemps               3         3   Temperature Data for Gauge

  InvoiceDetail             8       148   Invoice Detail Information

  InvoiceHeader            18        97   Invoice Header Information

  Levels                    2        40   Pricing Level Per Model by Percent

  LicenseInformation       19         1   Running R:BASE Your Way (Part 20) -

                                          Customer License

  PaymentTerms              1         8   Payment Terms

  PrintOptions              6        13   Print Options

  ProdLocation              5        20   Product Location, Quantity on Hand,

                                          and Cost

  Product                   4         8   Model Information, Including List

                                          Price

  RThemes                   2        86   List of New Available R:Themes

  SalesBonus                5        13   Sales Bonus Information

  SecurityTable             4         3   Application MainMenu Security/Login

                                          Table

  Staff                     8        42   Staff

  StateAbr                  2        51   State Names and Abbreviations

  Tasks                    12        28   List of Tasks to Track

  Titles                    2         8   Employee Titles List

 

Example 02.

-- The following lists views in a database

 

R>LIST VIEWS

 

  Views in the Database RRBYW20

 

  Name                Columns      Rows   Comments

  ------------------- ------- ---------   ---------------------------------

  CustomerContact           8       N/A   List of Customers and Contacts

  CustomerList              2       N/A   View - Customer List

  CustomerView              7       N/A   Sorted List of Customers

  FullOuterJoin            34       N/A   Sample Full Outer Join View

  InvoicesMaster           32       N/A   Invoice Master

  LeftOuterJoin             2       N/A   Sample Left Outer Join View

  ListOfReportsView         2       N/A   List of Reports to be Shown in

                                          Combo/List Boxes

  NewContact                3       N/A   Quick List of Customer Contacts

  NewCustomer               7       N/A   Test View for Sub-Reports

  NewEmployee               9       N/A   Test View for Sub-Reports

  NewInvoiceDetails        11       N/A   Test View for Sub-Reports

  NewInvoiceHeader         14       N/A   Test View for Sub-Reports

  OrganizationView          6       N/A   Organization View

  ProdAlias                31       N/A   Products Sold by Date - View

  ProductInvoice           21       N/A   Product Invoice View

  ProdView                 29       N/A   Sales by Products - View

  QrtrlySmmry_ByCust        2       N/A   Quarterly Summary View (By Customer)

  QuarterlySummary          2       N/A   Quarterly Summary View

  SalesByEmployee           6       N/A   Products Sold by Employee - View

  SalesCalendarView        11       N/A   Sales Calendar View

  SalesData                 9       N/A   Sales Summary by Invoice Number

  SalesDataByCompany        9       N/A   Sales Data by Company

  SalesInf                  4       N/A   Products Sold by Employee - View

  StaffByDept              11       N/A   Staff by Department

  TCrossTabView             4       N/A   CrossTab Data - View

  UnionView                 2       N/A   Sample Union View

  YT3                       6       N/A   YTD Invoice Summary

  YTDInvoiceTotal           6       N/A   Year-To-Date Invoice Totals by Customer

 

Example 03.

-- The following lists foreign keys in a database

 

R>LIST FKEYS

 

Id     Type             Table Name         Column Name(s)     Ref Table Name     Ref Column Name(s)

------ ---------------- ------------------ ------------------ ------------------ ------------------

#46    FOREIGN KEY      CompUsed           CompID             Component          CompID

#45    FOREIGN KEY      CompUsed           Model              Product            Model

#47    FOREIGN KEY      ProdLocation       Model              Product            Model

#49    FOREIGN KEY      InvoiceDetail      Model              Product            Model

#48    FOREIGN KEY      InvoiceDetail      TransID            InvoiceHeader      TransID

#51    FOREIGN KEY      ContactCallNotes   EmpID              Employee           EmpID

#50    FOREIGN KEY      ContactCallNotes   ContID             Contact            ContID

#57    FOREIGN KEY      Levels             Model              Product            Model

#39    FOREIGN KEY      Employee           EmpTID             Titles             EmpTID

#54    FOREIGN KEY      Contact            CustID             Customer           CustID

#55    FOREIGN KEY      Staff              DepartmentID       Departments        DepartmentID

 

Example 04.

-- The following lists computed columns in a database

 

R>LIST COMPUTED

  Computed Columns

  Name               Table              Attributes

  ------------------ ------------------ ----------------------------------------

  Bonus              SalesBonus         Type: CURRENCY

                                        Expression: (netamount*bonuspct)

  Freight            InvoiceHeader      Type: CURRENCY

                                        Expression: (netamount* .01)

  Tax                InvoiceHeader      Type: CURRENCY

                                        Expression: (netamount* .081)

  InvoiceTotal       InvoiceHeader      Type: CURRENCY

                                        Expression: (netamount+freight+tax)

  SalePrice          InvoiceDetail      Type: CURRENCY

                                        Expression: (Price- (Price*Discount/100))

  ExtPrice           InvoiceDetail      Type: CURRENCY

                                        Expression: (Units*SalePrice)

 

Example 05.

-- The following lists forms that begin with "search"

 

R>LIST FORMS SEARCH%

 

  Form               Table / View       Form Description                         Modified            Version

  ------------------ ------------------ ---------------------------------------- ------------------- --------

  SearchAndEditCust1                    Search and Edit Customers (Part 1)  - Tr 01/16/2020 04:30 PM        2

  SearchAndEditCust2                    Search and Edit Customers (Part 2) - On  01/16/2020 04:30 PM        2

  SearchAndPrintInv  FormTable          Search and Print Customer Invoice        10/06/2018 09:24 PM        1

  SearchCustInvoice  FormTable          Search Customer Invoice and the option t 10/06/2018 09:24 PM        1

  SearchForm_DBGrid  Customer           Search Form using Custom DB Grid         10/06/2018 09:24 PM        1

 

Example 06.

-- The following lists reports that begin with "cust" in descending order

 

R>LIST REPORT CUST% DES

 

  Report             Table / View       Report Description                       Modified            Version

  ------------------ ------------------ ---------------------------------------- ------------------- --------

  CustYellowPages    Customer           Customer Phone Directory (Yellow Pages)  10/06/2018 09:24 PM        1

  CustomPageInvoice  ProdAlias          Invoice with Custom Page Numbers         09/19/2022 11:26 AM        5

  Customers          Customer           Master List of Customers                 09/20/2022 10:01 AM        5

  CustomerList       Customer           List of Active Customers                 09/30/2022 10:06 AM       33

  CustomerDirectory  Customer           Customer Phone Directory                 10/06/2018 09:24 PM        1

  CustomerContacts   Customer           Sub-Reports (2 Tables): Customer and Con 10/06/2018 09:24 PM        1

  CustDirWithURL_VAR Customer           Customer Phone Directory with Hyperlinks 10/06/2018 09:24 PM        1

  CustDirWithURL_DB  Customer           Customer Phone Directory with Hyperlinks 10/06/2018 09:24 PM        1

  CustContInvoices   NewCustomer        Sub-Reports (4 Tables): NewCustomer, New 10/06/2018 09:24 PM        1