Поделиться через


DROP TYPE (U-SQL)

Summary

U-SQL named types can be deleted with the DROP TYPE statement.

Warning

This operation cannot be undone!

Syntax

Drop_Type_Statement :=                                                                                   
    'DROP' 'TYPE' ['IF' 'EXISTS'] Type_Identifier.
Type_Identifier := DB_Object_Identifier.

Remarks

  • Type_Identifier
    Specifies the type to be dropped in the current static database context. If the name is a two-part name, the type will be dropped in the specified database. If the name is a simple identifier, then the procedure will be dropped in the current database context.

    If a type of the given name does not exist, or the user has no permissions to drop the type, an error is raised.

  • IF EXISTS
    If the optional IF EXISTS is specified, then the statement drops the type if it exists, or succeeds without changes if the type does not exist or the user has no permission to at least enumerate all existing types.

Examples

  • 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.
DROP TYPE TestReferenceDB.dbo.PhoneType;

See Also