DROP SHARDING ALGORITHM

Description

The DROP SHARDING ALGORITHM syntax is used to drop sharding algorithm for specified database.

Syntax

Grammar Railroad diagram

  1. DropShardingAlgorithm ::=
  2. 'DROP' 'SHARDING' 'ALGORITHM' shardingAlgorithmName ifExists? ('FROM' databaseName)?
  3. ifExists ::=
  4. 'IF' 'EXISTS'
  5. shardingAlgorithmName ::=
  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 used for avoid Sharding algorithm not exists error.

Example

  • Drop sharding algorithm for specified database
  1. DROP SHARDING ALGORITHM t_order_hash_mod FROM sharding_db;
  • Drop sharding algorithm for current database
  1. DROP SHARDING ALGORITHM t_order_hash_mod;
  • Drop sharding algorithm with ifExists clause
  1. DROP SHARDING ALGORITHM IF EXISTS t_order_hash_mod;

Reserved word

DROP, SHARDING, ALGORITHM, FROM