SHOW SHARDING KEY GENERATORS

Description

SHOW SHARDING KEY GENERATORS syntax is used to query sharding key generators in specified database.

Syntax

Grammar Railroad diagram

  1. ShowShardingKeyGenerators::=
  2. 'SHOW' 'SHARDING' 'KEY' 'GENERATORS' ('FROM' databaseName)?
  3. databaseName ::=
  4. identifier

Supplement

  • When databaseName is not specified, the default is the currently used DATABASE. If DATABASE is not used, No database selected will be prompted.

Return value description

columnDescription
nameSharding key generator name
typeSharding key generator type
propsSharding key generator properties

Example

  • Query the sharding key generators of the specified logical database
  1. SHOW SHARDING KEY GENERATORS FROM sharding_db;
  1. mysql> SHOW SHARDING KEY GENERATORS FROM sharding_db;
  2. +-------------------------+-----------+-------+
  3. | name | type | props |
  4. +-------------------------+-----------+-------+
  5. | snowflake_key_generator | snowflake | {} |
  6. +-------------------------+-----------+-------+
  7. 1 row in set (0.00 sec)
  • Query the sharding key generators of the current logical database
  1. SHOW SHARDING KEY GENERATORS;
  1. mysql> SHOW SHARDING KEY GENERATORS;
  2. +-------------------------+-----------+-------+
  3. | name | type | props |
  4. +-------------------------+-----------+-------+
  5. | snowflake_key_generator | snowflake | {} |
  6. +-------------------------+-----------+-------+
  7. 1 row in set (0.00 sec)

Reserved word

SHOW, SHARDING, KEY, GENERATORS, FROM