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'
[ @grpname = ] 'group'
Is the name of the group to add. group is sysname, with no default.
0 (success) or 1 (failure)
sp_addgroup calls sp_addrole to add the new group.
Only members of sysadmin fixed server role, and the db_securityadmin and db_owner fixed database roles can execute sp_addgroup.
This example creates the group accounting.
EXEC sp_addgroup 'accounting'