Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

sp_dropgroup (Transact-SQL)

SQL Server 2005

Removes a role from the current database.

ms177569.note(en-US,SQL.90).gifImportant:
sp_dropgroup provides compatibility with earlier versions of Microsoft SQL Server. This feature will be removed in the next version of Microsoft SQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature. Use DROP ROLE instead.

Topic link icon Transact-SQL Syntax Conventions


sp_dropgroup [ @rolename = ] 'role'
[ @rolename = ] 'role'

Is the role to remove from the current database. role is sysname, with no default.

0 (success) or 1 (failure)

sp_dropgroup calls DROP ROLE. This is the preferred way to remove a role. For information about removing a role from the database, see DROP ROLE (Transact-SQL).

sp_dropgroup cannot be executed within a user-defined transaction.

Requires CONTROL permission on the role or ALTER ANY ROLE permission on the database.

The following example uses DROP ROLE to remove the role my_role from the current database. This is the preferred method.

DROP ROLE my_role;
GO
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.