COUNT SINGLE_TABLE RULE

Description

The COUNT SINGLE_TABLE RULE syntax is used to query number of single table rules for specified database.

Syntax

  1. CountSingleTableRule::=
  2. 'COUNT' 'SINGLE_TABLE' 'RULE' ('FROM' databaseName)?
  3. databaseName ::=
  4. identifier

Supplement

  • When databaseName is not specified, the default is the currently used DATABASE. If DATABASE is not used, No database selected will be prompted.

Return Value Description

ColumnDescription
rule_nameSingle table rule name
databaseThe database name where the single table is located
countThe count of single table rules

Example

  • Query the number of single table rules for specified database.
  1. COUNT SINGLE_TABLE RULE
  1. mysql> COUNT SINGLE_TABLE RULE;
  2. +--------------+----------+-------+
  3. | rule_name | database | count |
  4. +--------------+----------+-------+
  5. | t_single_0 | ds | 2 |
  6. +--------------+----------+-------+
  7. 1 row in set (0.02 sec)

Reserved word

COUNT, SINGLE_TABLE, RULE