DROP DEFAULT SHARDING STRATEGY

Description

The DROP DEFAULT SHARDING STRATEGY syntax is used to drop default sharding strategy for specified database.

Syntax

Grammar Railroad diagram

  1. DropDefaultShardingStrategy ::=
  2. 'DROP' 'DEFAULT' 'SHARDING' ('TABLE' | 'DATABASE') 'STRATEGY' ifExists? ('FROM' databaseName)?
  3. ifExists ::=
  4. 'IF' 'EXISTS'
  5. databaseName ::=
  6. 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 Default sharding strategy not exists error.

Example

  • Drop default sharding table strategy for specified database
  1. DROP DEFAULT SHARDING TABLE STRATEGY FROM sharding_db;
  • Drop default sharding database strategy for current database
  1. DROP DEFAULT SHARDING DATABASE STRATEGY;
  • Drop default sharding table strategy with ifExists clause
  1. DROP DEFAULT SHARDING TABLE STRATEGY IF EXISTS;
  • Drop default sharding database strategy with ifExists clause
  1. DROP DEFAULT SHARDING DATABASE STRATEGY IF EXISTS;

Reserved word

DROP, DEFAULT , SHARDING, TABLE, DATABASE ,STRATEGY, FROM