LIST VIEWS Command

Displays without pausing information about SQL views in the current database.

LIST VIEWS   [TO PRINTER [PROMPT] | TO FILE FileName]   [NOCONSOLE]

Parameters

  • TO PRINTER [PROMPT]
    Directs the information returned from LIST VIEWS to a printer.

    You can include PROMPT to display a Print dialog box before printing starts. Place the PROMPT keyword immediately after TO PRINTER.

  • TO FILE FileName
    Directs output from LIST VIEWS to the disk file specified with FileName. If the file already exists and SET SAFETY is ON, Visual FoxPro displays a prompt asking if you want to overwrite the file.

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

Remarks

LIST VIEWS displays the names of SQL views in the current database, and indicates if the SQL views are based on local or remote tables. Use DBGETPROP( ) to return additional information about SQL views in the current database.

SQL views are created with CREATE SQL VIEW.

Example

The following example opens the testdata database. CREATE SQL VIEW is used to create a local SQL view named myview. The View Designer is displayed, allowing you to specify tables and conditions for the SQL view. After you save the SQL view you create, information about the SQL views in the database is listed.

CLOSE DATABASES
OPEN DATABASE (HOME(2) + 'data\testdata')
CREATE SQL VIEW myview

CLEAR
LIST VIEWS

See Also

CREATE DATABASE | CREATE SQL VIEW | DBGETPROP( ) | DISPLAY DATABASE | DISPLAY VIEWS