DROP SHARDING TABLE RULE
描述
DROP SHARDING TABLE RULE
语法用于删除指定逻辑库的指定分片规则
语法定义
语法 铁路图
DropShardingTableRule ::=
'DROP' 'SHARDING' 'TABLE' 'RULE' ifExists? shardingRuleName (',' shardingRuleName)* ('FROM' databaseName)?
ifExists ::=
'IF' 'EXISTS'
shardingRuleName ::=
identifier
databaseName ::=
identifier
补充说明
- 未指定
databaseName
时,默认是当前使用的DATABASE
。 如果也未使用DATABASE
则会提示No database selected
; ifExists
子句用于避免Sharding rule not exists
错误。
示例
- 为指定逻辑库删除多个指定分片规则
DROP SHARDING TABLE RULE t_order, t_order_item FROM sharding_db;
- 为当前逻辑库删除单个指定分片规则
DROP SHARDING TABLE RULE t_order;
- 使用
ifExists
子句删除分片规则
DROP SHARDING TABLE RULE IF EXISTS t_order;
保留字
DROP
、SHARDING
、TABLE
、RULE
、FROM
相关链接
当前内容版权归 ShardingSphere 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 ShardingSphere .