DROP SCHEMA (U-SQL)
The statement drops the schema in the current database context and deletes all the data contained within from the system.
This operation cannot be undone!
Drop_Schema_Statement := 'DROP' 'SCHEMA' ['IF' 'EXISTS'] Schema_Name.
Schema_Name := Quoted_or_Unquoted_Identifier.
Specifies the name of the schema in form of a quoted or unquoted U-SQL identifier. If a schema of the given name does not exist in the current database context, or the user has no permissions to drop a schema, an error is raised.
If the optional
IF EXISTSis specified, then the statement drops the schema if it already exists, or succeeds without changes if the schema does not exist or the user has no permission to at least enumerate all existing schemas.
- 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 script shows how the
My Schema schema is deleted from the current database context if it already exists before it is recreated:
DROP SCHEMA IF EXISTS [My Schema]; CREATE SCHEMA [My Schema];