DROP SHARDING KEY GENERATOR

Description

The DROP SHARDING KEY GENERATOR syntax is used to drop sharding key generator for specified database.

Syntax

Grammar Railroad diagram

  1. DropShardingKeyGenerator ::=
  2. 'DROP' 'SHARDING' 'KEY' 'GENERATOR' ifExists? keyGeneratorName (keyGeneratorName)* ('FROM' databaseName)?
  3. ifExists ::=
  4. 'IF' 'EXISTS'
  5. keyGeneratorName ::=
  6. identifier
  7. databaseName ::=
  8. 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;
  • ifExists clause is used for avoid Sharding key generator not exists error.

Example

  • Drop sharding key generator for specified database
  1. DROP SHARDING KEY GENERATOR t_order_snowflake FROM sharding_db;
  • Drop sharding key generator for current database
  1. DROP SHARDING KEY GENERATOR t_order_snowflake;
  • Drop sharding key generator with ifExists clause
  1. DROP SHARDING KEY GENERATOR IF EXISTS t_order_snowflake;

Reserved word

DROP, SHARDING, KEY, GENERATOR, FROM