COUNT MASK RULE
语法用于查询指定逻辑库中的数据脱敏规则数量。
CountMaskRule::=
'COUNT' 'MASK' 'RULE' ('FROM' databaseName)?
databaseName ::=
identifier
databaseName
时,默认是当前使用的 DATABASE
,如果也未使用 DATABASE
则会提示 No database selected
。列 | 说明 |
---|---|
rule_name | 规则类型 |
database | 规则所属逻辑库 |
count | 规则数量 |
COUNT MASK RULE FROM mask_db;
mysql> COUNT MASK RULE FROM mask_db;
+-----------+----------+-------+
| rule_name | database | count |
+-----------+----------+-------+
| mask | mask_db | 3 |
+-----------+----------+-------+
1 row in set (0.50 sec)
COUNT MASK RULE;
mysql> COUNT MASK RULE;
+-----------+----------+-------+
| rule_name | database | count |
+-----------+----------+-------+
| mask | mask_db | 3 |
+-----------+----------+-------+
1 row in set (0.50 sec)
COUNT
、MASK
、RULE
、FROM