gebeurtenis
31 mrt, 23 - 2 apr, 23
De grootste SQL-, Fabric- en Power BI-leerevenement. 31 maart – 2 april. Gebruik code FABINSIDER om $ 400 te besparen.
Zorg dat u zich vandaag nog registreertDeze browser wordt niet meer ondersteund.
Upgrade naar Microsoft Edge om te profiteren van de nieuwste functies, beveiligingsupdates en technische ondersteuning.
Applies to:
SQL Server
Azure SQL Database
Azure SQL Managed Instance
Returns information about the roles in the current database.
Transact-SQL syntax conventions
sp_helprole [ [ @rolename = ] N'rolename' ]
[ ; ]
The name of a role in the current database. @rolename is sysname, with a default of NULL
. @rolename must exist in the current database. If @rolename isn't specified, information about all roles in the current database is returned.
0
(success) or 1
(failure).
Column name | Data type | Description |
---|---|---|
RoleName |
sysname | Name of the role in the current database. |
RoleId |
smallint | ID of RoleName . |
IsAppRole |
int | 0 = RoleName isn't an application role.1 = RoleName is an application role. |
To view the permissions associated with the role, use sp_helprotect
. To view the members of a database role, use sp_helprolemember
.
Requires membership in the public role.
The following query returns all the roles in the current database.
EXEC sp_helprole;
gebeurtenis
31 mrt, 23 - 2 apr, 23
De grootste SQL-, Fabric- en Power BI-leerevenement. 31 maart – 2 april. Gebruik code FABINSIDER om $ 400 te besparen.
Zorg dat u zich vandaag nog registreert