SHOW UNUSED SHARDING KEY GENERATORS
语法用于查询指定逻辑库中未被使用的分布式主键生成器。
ShowUnusedShardingKeyGenerators::=
'SHOW' 'UNUSED' 'SHARDING' 'KEY' 'GENERATOR' ('FROM' databaseName)?
databaseName ::=
identifier
databaseName
时,默认是当前使用的 DATABASE
。 如果也未使用 DATABASE
则会提示 No database selected
。列 | 说明 |
---|---|
name | 分布式主键生成器名称 |
type | 分布式主键生成器类型 |
props | 分布式主键生成器参数 |
SHOW UNUSED SHARDING KEY GENERATORS FROM sharding_db;
mysql> SHOW UNUSED SHARDING KEY GENERATORS FROM sharding_db;
+-------------------------+-----------+-------+
| name | type | props |
+-------------------------+-----------+-------+
| snowflake_key_generator | snowflake | |
+-------------------------+-----------+-------+
1 row in set (0.01 sec)
SHOW UNUSED SHARDING KEY GENERATORS;
mysql> SHOW UNUSED SHARDING KEY GENERATORS;
+-------------------------+-----------+-------+
| name | type | props |
+-------------------------+-----------+-------+
| snowflake_key_generator | snowflake | |
+-------------------------+-----------+-------+
1 row in set (0.02 sec)
SHOW
、UNUSED
、 SHARDING
、KEY
、GENERATORS
、FROM