COUNT BROADCAST RULE
语法用于查询指定逻辑库中的广播表规则数量。
CountBroadcastRule::=
'COUNT' 'BROADCAST' 'RULE' ('FROM' databaseName)?
databaseName ::=
identifier
databaseName
时,默认是当前使用的 DATABASE
。 如果也未使用 DATABASE
则会提示 No database selected
。列 | 说明 |
---|---|
rule_name | 规则类型 |
database | 规则所属逻辑库 |
count | 规则数量 |
COUNT BROADCAST RULE FROM sharding_db;
mysql> COUNT BROADCAST RULE FROM sharding_db;
+--------------------------+----------------+-------+
| rule_name | database | count |
+--------------------------+----------------+-------+
| broadcast_table | sharding_db | 0 |
+--------------------------+----------------+-------+
1 rows in set (0.00 sec)
COUNT BROADCAST RULE;
mysql> COUNT BROADCAST RULE;
+--------------------------+----------------+-------+
| rule_name | database | count |
+--------------------------+----------------+-------+
| broadcast_table | sharding_db | 0 |
+--------------------------+----------------+-------+
1 rows in set (0.00 sec)
COUNT
、BROADCAST
、RULE
、FROM