SHOW RULES USED RESOURCE

Description

The SHOW RULES USED RESOURCE syntax is used to query the rules that use the specified resource in the specified database.

Syntax

  1. showRulesUsedResource ::=
  2. 'SHOW' 'RULES' 'USED' 'RESOURCES' resourceName ('FROM' databaseName)?
  3. resourceName ::=
  4. IDENTIFIER | STRING
  5. databaseName ::=
  6. IDENTIFIER

Supplement

  • When databaseName is not specified, the default is the currently used DATABASE; if DATABASE is not used, it will prompt No database selected.

Return Value Description

ColumnDescription
typefeatures
nameData source name

Example

  • Query the rules that use the specified resource in the specified database
  1. SHOW RULES USED RESOURCE ds_0 FROM sharding_db;
  1. +----------+--------------+
  2. | type | name |
  3. +----------+--------------+
  4. | sharding | t_order |
  5. | sharding | t_order_item |
  6. +----------+--------------+
  7. 2 rows in set (0.00 sec)
  • Query the rules that use the specified resource in the current database
  1. SHOW RULES USED RESOURCE ds_0;
  1. +----------+--------------+
  2. | type | name |
  3. +----------+--------------+
  4. | sharding | t_order |
  5. | sharding | t_order_item |
  6. +----------+--------------+
  7. 2 rows in set (0.00 sec)