Create a new database role in the current database.
Syntax CREATE ROLE role [AUTHORIZATION owner] Key role The role to create. owner The database user or role that is to own the new role. (default=the user that executes the CREATE ROLE command.)
Starting in SQL Server 2005 the behavior of schemas changed in that schemas are no longer equivalent to database users.
CREATE ROLE nurses AUTHORIZATION JaneDoe;
GO CREATE ROLE doctors AUTHORIZATION db_securityadmin; GO
"I don't know if I believe in role models. We're all so different; we're all individuals. In the long run, that's what matters" - Wilson Cruz
sp_addrolemember - Add members to a role
Equivalent Oracle command:
© Copyright SS64.com 1999-2013
Some rights reserved