UNREGISTER STORAGE UNIT
Description
The UNREGISTER STORAGE UNIT
syntax is used to unregister storage unit from the current database
Syntax
UnregisterStorageUnit ::=
'UNREGISTER' 'STORAGE' 'UNIT' ( 'IF' 'EXISTS' )? storageUnitName ( ',' storageUnitName )* ( 'IGNORE' 'SINGLE' 'TABLES' )?
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 TABLE RULE
, and when the user confirms that this restriction can be ignored, theIGNORE SINGLE TABLES
keyword can be added to remove the storage unit.
Example
- Drop a storage unit
UNREGISTER STORAGE UNIT su_0;
- Drop multiple storage units
UNREGISTER STORAGE UNIT su_1, su_2;
- Ignore single table rule remove storage unit
UNREGISTER STORAGE UNIT su_1 IGNORE SINGLE TABLES;
- Drop the storage unit if it exists
UNREGISTER STORAGE UNIT IF EXISTS su_2;
Reserved word
DROP
, STORAGE
, UNIT
, IF
, EXISTS
, IGNORE
, SINGLE
, TABLES
Related links
当前内容版权归 ShardingSphere 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 ShardingSphere .