DROP VIEW (U-SQL)
Updated: March 10, 2017
A view can be dropped with the DROP VIEW statement. The statement drops the specified view but leaves the underlying data sources untouched.
This operation cannot be undone! |
| Syntax |
|---|
Drop_View_Statement :=
'DROP' 'VIEW' ['IF' 'EXISTS'] Identifier.
|
Semantics of Syntax Elements
Identifier
Specifies the name of the view to be defined. If a view of the given name does not exist, or the user has no permissions to drop the view, an error is raised.IF EXISTS
If the optionalIF EXISTSis specified, then the statement drops the view if it already exists, or succeeds without changes if the view does not exist or the user has no permission to at least enumerate all existing views.
Example
- The example can be executed in Visual Studio with the Azure Data Lake Tools plug-in.
- The script can be executed locally. An Azure subscription and Azure Data Lake Analytics account is not needed when executed locally.
The following statement deletes the view SampleView in the current database context and schema context if it exists and completes without changes if the view does not exist:
DROP VIEW IF EXISTS TestReferenceDB.dbo.SampleView;