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
Geri Bildirim
https://aka.ms/ContentUserFeedback.
Çok yakında: 2024 boyunca, içerik için geri bildirim mekanizması olarak GitHub Sorunları’nı kullanımdan kaldıracak ve yeni bir geri bildirim sistemiyle değiştireceğiz. Daha fazla bilgi için bkz.Gönderin ve geri bildirimi görüntüleyin