Partager via


DELETE VIEW Command

Deletes a SQL view from the current database.

DELETE VIEW ViewName

Parameters

  • ViewName
    Specifies the name of the view deleted from the current database.

Remarks

Use CREATE SQL VIEW to create a SQL view and add the view to the current database. If a SQL view is opened and then deleted, the cursors containing the SQL view results are not closed.

DELETE VIEW requires exclusive use of the database. To open a database for exclusive use, include EXCLUSIVE in OPEN DATABASE.

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, making it possible for you to specify tables and conditions for the SQL view. After you save the SQL view, DISPLAY DATABASE is used to display information about the SQL view. DELETE VIEW is then used to delete the local SQL view named myview.

CLOSE DATABASES
OPEN DATABASE (HOME(2) + 'Data\testdata')

CREATE SQL VIEW myview
CLEAR
DISPLAY DATABASE
DELETE VIEW myview

See Also

CREATE SQL VIEW | OPEN DATABASE