SHOW SHARDING TABLE RULES USED ALGORITHM
语法用于查询指定逻辑库中使用指定分片算法的分片规则。
ShowShardingTableRulesUsedAlgorithm::=
'SHOW' 'SHARDING' 'TABLE' 'RULES' 'USED' 'ALGORITHM' algorithmName ('FROM' databaseName)?
algorithmName ::=
identifier
databaseName ::=
identifier
databaseName
时,默认是当前使用的 DATABASE
。 如果也未使用 DATABASE
则会提示 No database selected
。列 | 说明 |
---|---|
type | 分片规则类型 |
name | 分片规则名称 |
SHOW SHARDING TABLE RULES USED ALGORITHM table_inline FROM test1;
mysql> SHOW SHARDING TABLE RULES USED ALGORITHM table_inline FROM test1;
+-------+--------------+
| type | name |
+-------+--------------+
| table | t_order_item |
+-------+--------------+
1 row in set (0.00 sec)
SHOW SHARDING TABLE RULES USED ALGORITHM table_inline;
mysql> SHOW SHARDING TABLE RULES USED ALGORITHM table_inline;
+-------+--------------+
| type | name |
+-------+--------------+
| table | t_order_item |
+-------+--------------+
1 row in set (0.01 sec)
SHOW
、SHARDING
、TABLE
、RULES
、USED
、ALGORITHM
、FROM