Single Table

Syntax

  1. SHOW SINGLE TABLE (table | RULES) [FROM databaseName]
  2. SHOW SINGLE TABLES
  3. COUNT SINGLE_TABLE RULE [FROM databaseName]
  4. table:
  5. TABLE tableName

Return Value Description

Single Table Rule

ColumnDescription
nameRule name
resource_nameData source name

Single Table

ColumnDescription
table_nameSingle table name
resource_nameThe resource name where the single table is located

Single Table Rule Count

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

Example

SHOW SINGLE TABLES RULES

  1. sql> SHOW SINGLE TABLES RULES;
  2. +---------+---------------+
  3. | name | resource_name |
  4. +---------+---------------+
  5. | default | ds_1 |
  6. +---------+---------------+
  7. 1 row in set (0.01 sec)

SHOW SINGLE TABLE tableName

  1. sql> SHOW SINGLE TABLE t_single_0;
  2. +----------------+---------------+
  3. | table_name | resource_name |
  4. +----------------+---------------+
  5. | t_single_0 | ds_0 |
  6. +----------------+---------------+
  7. 1 row in set (0.01 sec)

SHOW SINGLE TABLES

  1. mysql> SHOW SINGLE TABLES;
  2. +--------------+---------------+
  3. | table_name | resource_name |
  4. +--------------+---------------+
  5. | t_single_0 | ds_0 |
  6. | t_single_1 | ds_1 |
  7. +--------------+---------------+
  8. 2 rows in set (0.02 sec)

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)