sp_droptype (Transact-SQL)
Applies to:
SQL Server
Deletes an alias data type from systypes
.
Transact-SQL syntax conventions
Syntax
sp_droptype [ @typename = ] N'typename'
[ ; ]
Arguments
[ @typename = ] N'typename'
The name of an alias data type that you own. @typename is sysname, with no default.
Return code type
0
(success) or 1
(failure).
Result set
None.
Remarks
The type alias data type can't be dropped if tables or other database objects reference it.
Note
An alias data type can't 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
. This alias data type must already exist, or this example returns an error message.
USE master;
GO
EXEC sp_droptype 'birthday';
GO
Related content
Повратне информације
https://aka.ms/ContentUserFeedback.
Стиже ускоро: Током 2024. године постепено ћемо укидати проблеме са услугом GitHub као механизам повратних информација за садржај и заменити га новим системом повратних информација. За додатне информације, погледајте:Пошаљите и прегледајте повратне информације за