<budget_name>!GET_SHARED_RESOURCES

Lists the shared resources that have been added to a custom budget using the ADD_SHARED_RESOURCE method.

语法

<budget_name>!GET_SHARED_RESOURCES()

返回

该方法会返回以下列:

Column NameData TypeDescription
RESOURCE_IDNUMBERSystem identifier of the resource.
NAMEVARCHARName of the specific resource, or NULL if all resources of the domain type are included in the budget.
DOMAINVARCHARThe type of resource.

访问控制要求

查看自定义预算的结果需要以下最低权限和角色:

  • ADMIN or VIEWER instance role for the budget instance.
  • 对包含预算实例的数据库和架构的 USAGE 权限。

For more information, see Budgets roles and privileges.

使用说明

  • 此方法只能在 自定义预算 实例上调用。
  • Calling this method does not return the object. Because of this, you can’t use method chaining to call another method on the return value of this method. Instead, call each method in a separate SQL statement.

示例

Get all shared resources that were added to the budget_db.budget_schema.my_budget budget:

CALL budget_db.budget_schema.my_budget!GET_SHARED_RESOURCES();