The DROP SHARDING TABLE RULE
syntax is used to drop sharding table rule for specified database.
DropShardingTableRule ::=
'DROP' 'SHARDING' 'TABLE' 'RULE' ifExists? ruleName (',' ruleName)* ('FROM' databaseName)?
ifExists ::=
'IF' 'EXISTS'
ruleName ::=
identifier
databaseName ::=
identifier
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 to avoid Sharding rule not exists
error.DROP SHARDING TABLE RULE t_order, t_order_item FROM sharding_db;
DROP SHARDING TABLE RULE t_order;
ifExists
clauseDROP SHARDING TABLE RULE IF EXISTS t_order;
DROP
, SHARDING
, TABLE
, RULE
, FROM