SHOW UNUSED SHARDING KEY GENERATORS
Description
SHOW UNUSED SHARDING KEY GENERATORS syntax is used to query sharding key generators that are not used in specified database.
Syntax
ShowUnusedShardingKeyGenerators::=
'SHOW' 'UNUSED' 'SHARDING' 'KEY' 'GENERATOR' ('FROM' databaseName)?
databaseName ::=
identifierSupplement
- 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
| column | Description |
|---|---|
| name | Sharding key generator name |
| type | Sharding key generator type |
| props | Sharding key generator properties |
Example
- Query sharding key generators that are not used in the specified logical database
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.00 sec)- Query sharding key generators that are not used in the current logical database
SHOW UNUSED SHARDING KEY GENERATORS;mysql> SHOW UNUSED SHARDING KEY GENERATORS;
+-------------------------+-----------+-------+
| name | type | props |
+-------------------------+-----------+-------+
| snowflake_key_generator | snowflake | |
+-------------------------+-----------+-------+
1 row in set (0.00 sec)Reserved word
SHOW, UNUSED, SHARDING, KEY, GENERATORS, FROM