SHOW SHARDING TABLE REFERENCE RULES
Description
SHOW SHARDING TABLE REFERENCE RULES
syntax is used to query sharding tables with reference relationships in the specified logical database.
Syntax
ShowShardingBindingTableRules::=
'SHOW' 'SHARDING' 'TABLE' 'REFERENCE' 'RULES'('FROM' databaseName)?
databaseName ::=
identifier
Supplement
- When
databaseName
is not specified, the default is the currently usedDATABASE
. IfDATABASE
is not used, No database selected will be prompted.
Return value description
Columns | Descriptions |
---|---|
name | Sharding table reference rule name |
sharding_table_reference | sharding table reference |
Example
- Query sharding table reference rules for the specified logical database
SHOW SHARDING TABLE REFERENCE RULES FROM test1;
mysql> SHOW SHARDING TABLE REFERENCE RULES FROM test1;
+-------+--------------------------+
| name | sharding_table_reference |
+-------+--------------------------+
| ref_0 | t_a,t_b |
| ref_1 | t_c,t_d |
+-------+--------------------------+
2 rows in set (0.00 sec)
- Query sharding table reference rules for the current logical database
SHOW SHARDING TABLE REFERENCE RULES;
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)
Reserved word
SHOW
, SHARDING
, TABLE
, REFERENCE
, RULES
, FROM
Related links
当前内容版权归 ShardingSphere 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 ShardingSphere .