Removes a group from a database.
sp_dropgroup grpname
where
Executing sp_dropgroup drops a group name from a database's sysusers table.
You cannot drop a group that has members. Before you can drop the group, you must execute sp_changegroup for each member.
In this example, the purchasing group has merged with the accounting group. Members of the purchasing group, Martha (username Martha) and George (username George), are moved. Martha is moved to the accounting group, George is moved to the public group. Then the purchasing group is dropped. The group name public is enclosed in single quotation marks because public is a reserved word.
sp_changegroup accounting, Martha EXEC sp_changegroup 'public', George EXEC sp_dropgroup purchasing
Only the database owner can use this procedure.
sysobjects, sysprotects, sysusers
GRANT | sp_changegroup |
REVOKE | sp_dropuser |
sp_addgroup | sp_helpgroup |
sp_adduser | USE |