Creates a group in the current database. sp_addgroup is included for backward compatibility. Microsoft® SQL Server™ version 7.0 uses roles instead of groups. Use sp_addrole to add a role.
sp_addgroup [@grpname =] 'group'
0 (success) or 1 (failure)
sp_addgroup calls sp_addrole to add the new group.
Only members of the db_securityadmin and db_owner fixed database roles can execute sp_addgroup.
This example creates the group accounting.
EXEC sp_addgroup 'accounting'
sp_addrole | sp_helpgroup |
sp_changegroup | sp_helprole |
sp_dropgroup | System Stored Procedures |