DROP SHARDING TABLE RULE
Description
The DROP SHARDING TABLE RULE
syntax is used to drop sharding table rule for specified database.
Syntax
Grammar Railroad diagram
DropShardingTableRule ::=
'DROP' 'SHARDING' 'TABLE' 'RULE' ifExists? shardingRuleName (',' shardingRuleName)* ('FROM' databaseName)?
ifExists ::=
'IF' 'EXISTS'
shardingRuleName ::=
identifier
databaseName ::=
identifier
Supplement
- When
databaseName
is not specified, the default is the currently usedDATABASE
. IfDATABASE
is not used,No database selected
will be prompted; ifExists
clause is used to avoidSharding rule not exists
error.
Example
- Drop mutiple sharding table rules for specified database
DROP SHARDING TABLE RULE t_order, t_order_item FROM sharding_db;
- Drop a sharding table rule for current database
DROP SHARDING TABLE RULE t_order;
- Drop sharding table rule with
ifExists
clause
DROP SHARDING TABLE RULE IF EXISTS t_order;
Reserved word
DROP
, SHARDING
, TABLE
, RULE
, FROM
Related links
当前内容版权归 ShardingSphere 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 ShardingSphere .