SYSCS_DIAG.CONTAINED_ROLES diagnostic table function The SYSCS_DIAG.CONTAINED_ROLES diagnostic table function returns all the roles contained within the specified role. SYSCS_DIAG.CONTAINED_ROLES diagnostic table function diagnostic table functionsSYSCS_DIAG.CONTAINED_ROLES

The argument that is passed to this table function should be the name of the role, specified as a string in quotes, or the special keyword CURRENT_ROLE, which indicates the current role in effect. For a definition of role containment, see "Syntax for roles" in GRANT statement.

For example:

SELECT * FROM TABLE (SYSCS_DIAG.CONTAINED_ROLES('READER')) AS T1 SELECT * FROM TABLE (SYSCS_DIAG.CONTAINED_ROLES(CURRENT_ROLE)) AS T2

All users can access this diagnostic table function, whether or not the database has authentication and SQL authorization enabled. See "Configuring user authentication" and "Configuring user authorization" in the for more information.

The returned table has the column shown in the following table.

Column returned by the SYSCS_DIAG.CONTAINED_ROLES table functionFor the column returned by the SYSCS_DIAG.CONTAINED_ROLES table function, this table provides its data type, its length in bytes, whether it is nullable, and a description of its contents. Column Name Type Length Nullable Contents ROLEID VARCHAR 128 false The identifier of the role.