You can execute the DROP TENANT statement to delete a tenant from the ApsaraDB for OceanBase system.
drop_tenant_stmt: DROP TENANT [IF EXISTS] tenant_name;
The name of the tenant that you want to delete.
Only a locked tenant can be deleted. If you execute this statement to delete an unlocked tenant, the system returns an error.
- Delete tenant TENANT1.
DROP TENANT TENANT1;
Before you execute the DROP TENANT statement to delete a tenant, connect your root user to the root tenant root@ROOT.