UNREGISTER STORAGE UNIT
Description
The UNREGISTER STORAGE UNIT
syntax is used to unregister storage unit from the current database
Syntax
Grammar Railroad diagram
UnregisterStorageUnit ::=
'UNREGISTER' 'STORAGE' 'UNIT' ifExists? storageUnitName (',' storageUnitName)* ('IGNORE' 'SINGLE' 'TABLES')?
ifExists ::=
'IF' 'EXISTS'
storageUnitName ::=
identifier
Supplement
UNREGISTER STORAGE UNIT
will only unregister storage unit in Proxy, the real data source corresponding to the storage unit will not be unregistered;- Unable to unregister storage unit already used by rules.
Storage unit are still in used.
will be prompted when removing storage units used by rules; - The storage unit need to be removed only contains
SINGLE RULE
, and when the user confirms that this restriction can be ignored, theIGNORE SINGLE TABLES
keyword can be added to remove the storage unit; ifExists
clause is used for avoidStorage unit not exists
error.
Example
- Drop a storage unit
UNREGISTER STORAGE UNIT ds_0;
- Drop multiple storage units
UNREGISTER STORAGE UNIT ds_0, ds_1;
- Ignore single rule remove storage unit
UNREGISTER STORAGE UNIT ds_0 IGNORE SINGLE TABLES;
- Drop the storage unit with
ifExists
clause
UNREGISTER STORAGE UNIT IF EXISTS ds_0;
Reserved word
DROP
, STORAGE
, UNIT
, IF
, EXISTS
, IGNORE
, SINGLE
, TABLES
Related links
当前内容版权归 ShardingSphere 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 ShardingSphere .