SHOW SHADOW RULE

    语法

    • 未指定 databaseName 时,默认是当前使用的 DATABASE。 如果也未使用 DATABASE 则会提示 No database selected

    返回值说明

    • 查询指定逻辑库中的指定影子规则
    1. SHOW SHADOW RULE shadow_rule FROM shadow_db;
    1. mysql> SHOW SHADOW RULE shadow_rule FROM shadow_db;
    2. | rule_name | source_name | shadow_name | shadow_table |
    3. +-------------+-------------+-------------+----------------------+
    4. | shadow_rule | ds_0 | ds_1 | t_order_item,t_order |
    5. 1 row in set (0.00 sec)
    • 查询当前逻辑库中的指定影子规则
    1. mysql> SHOW SHADOW RULE shadow_rule;
    2. +-------------+-------------+-------------+----------------------+
    3. | rule_name | source_name | shadow_name | shadow_table |
    4. +-------------+-------------+-------------+----------------------+
    5. | shadow_rule | ds_0 | ds_1 | t_order_item,t_order |
    6. 1 row in set (0.01 sec)
    • 查询指定逻辑库中的影子规则
    1. SHOW SHADOW RULES FROM shadow_db;
    • 查询当前逻辑库中的影子规则
    1. SHOW SHADOW RULES;
    1. +-------------+-------------+-------------+----------------------+
    2. | rule_name | source_name | shadow_name | shadow_table |
    3. +-------------+-------------+-------------+----------------------+
    4. | shadow_rule | ds_0 | ds_1 | t_order_item,t_order |
    5. +-------------+-------------+-------------+----------------------+

    保留字