Udostępnij za pośrednictwem


sp_droptype (Transact-SQL)

Deletes an alias data type from systypes.

Ikona łącza do tematu Transact-SQL Syntax Conventions

Składnia

sp_droptype [ @typename = ] 'type'

Arguments

  • [ @typename=] 'type'
    Is the name of an alias data type that you own. type is sysname, with no default.

Return Code Type

0 (success) or 1 (failure)

Result Sets

None

Uwagi

The type alias data type cannot be dropped if tables or other database objects reference it.

[!UWAGA]

An alias data type cannot be dropped if the alias data type is used within a table definition or if a rule or default is bound to it.

Permissions

Requires membership in the db_owner fixed database role or the db_ddladmin fixed database role.

Examples

The following example drops the alias data type birthday.

[!UWAGA]

This alias data type must already exist or this example returns an error message.

USE master;
GO
EXEC sp_droptype 'birthday';
GO

Zobacz także

Odwołanie

Database Engine Stored Procedures (Transact-SQL)

sp_addtype (Transact-SQL)

sp_rename (Transact-SQL)

System Stored Procedures (Transact-SQL)