SHOW UNUSED SHARDING KEY GENERATORS

Description

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

Syntax

  1. ShowShardingKeyGenerators::=
  2. 'SHOW' 'SHARDING' 'KEY' 'GENERATOR'('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 sharding key generators that are not used in the specified logical database
  1. SHOW UNUSED SHARDING KEY GENERATORS FROM test1;
  1. mysql> SHOW UNUSED SHARDING KEY GENERATORS FROM test1;
  2. +-------------------------+-----------+-------+
  3. | name | type | props |
  4. +-------------------------+-----------+-------+
  5. | snowflake_key_generator | snowflake | |
  6. +-------------------------+-----------+-------+
  7. 1 row in set (0.00 sec)
  • Query sharding key generators that are not used in the current logical database
  1. SHOW UNUSED SHARDING KEY GENERATORS;
  1. mysql> SHOW UNUSED 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, UNUSED, SHARDING, KEY, GENERATORS, FROM