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