SHOW SHARDING TABLE REFERENCE RULE
语法
- 未指定
databaseName
时,默认是当前使用的 DATABASE
。 如果也未使用 DATABASE
则会提示 No database selected
。
返回值说明
SHOW SHARDING TABLE REFERENCE RULES FROM sharding_db;
mysql> SHOW SHARDING TABLE REFERENCE RULES FROM sharding_db;
+-------+--------------------------+
+-------+--------------------------+
| ref_0 | t_a,t_b |
| ref_1 | t_c,t_d |
2 rows in set (0.00 sec)
mysql> SHOW SHARDING TABLE REFERENCE RULES;
+-------+--------------------------+
| name | sharding_table_reference |
+-------+--------------------------+
| ref_0 | t_a,t_b |
| ref_1 | t_c,t_d |
2 rows in set (0.00 sec)
SHOW SHARDING TABLE REFERENCE RULE ref_0 FROM sharding_db;
SHOW SHARDING TABLE REFERENCE RULE ref_0;
+-------+--------------------------+
| name | sharding_table_reference |
+-------+--------------------------+
| ref_0 | t_a,t_b |
+-------+--------------------------+
1 row in set (0.00 sec)
保留字