Freigeben über


DISPLAY STRUCTURE Command

Displays the structure of a table file.

DISPLAY STRUCTURE [IN nWorkArea | cTableAlias]
   [TO PRINTER [PROMPT] | TO FILE FileName] [NOCONSOLE]

Parameters

  • IN nWorkArea | cTableAlias
    Displays the structure of the table in a work area other than the current work areas. nWorkArea specifies the work area number and cTableAlias specifies the table alias.

  • TO PRINTER [PROMPT]
    Directs output from DISPLAY STRUCTURE to a printer.

    You can include the optional PROMPT clause to display a dialog box before printing starts. In this dialog box, you can adjust printer settings, including the number of copies and page numbers to print. The printer settings that you can adjust depend on the currently installed printer driver. Place the PROMPT keyword immediately after TO PRINTER.

  • TO FILE FileName
    Directs output from DISPLAY STRUCTURE to the file specified with FileName. If the file already exists and SET SAFETY is ON, you are asked if you want to overwrite the file.

  • NOCONSOLE
    Suppresses output to the main Visual FoxPro window or to the active user-defined window.

Remarks

Use DISPLAY STRUCTURE to display the field structure of a table. The name of each field in the table is displayed with its type and width. If a field is a Numeric, Double, or Float type field, the number of decimal places in the field is displayed. Null value support for each field is also displayed.

DISPLAY STRUCTURE also displays the current number of records in the table and the date it was last updated. If the table has an associated memo field, the memo field block size is shown. The total width of all fields is also displayed, as is the table's code page.

The table can have a structural compound index that is opened with the table. If a tag in the structural compound index has the same name as a field in the table, the order of the tag (ascending or descending) and the tag's collation sequence is displayed next to the field name.

If SET FIELDS is used to limit access to fields in the table, an angle bracket (>) appears beside the names of fields that can be accessed.

Example

In the following example, the customer table in the testdata database is opened. DISPLAY STRUCTURE is used to display the table structure.

CLOSE DATABASES
OPEN DATABASE (HOME(2) + 'Data\testdata')
USE customer  && Opens Customer table

CLEAR
DISPLAY STRUCTURE

See Also

LIST | DISPLAY TABLES Command | DISPLAY STATUS Command