# DROP WORKSPACE

Deletes the specified workspace.

## Syntax

```
DROP WORKSPACE [ IF EXISTS ]
    { ID '<workspace_ID>' | '<workspace_name>' } 
    [ IN GROUP { ID '<group_ID>' | '<group_name>' } ]
    [ WAIT ON TERMINATED ]
```

## Arguments

* `workspace_ID`, `workspace_name`: ID or name of the workspace to delete.
* `group_ID`, `group_name`: ID or name of the workspace group that contains the workspace.

## Remarks

* Specify the `IF EXISTS` clause to attempt the delete operation only if a workspace with the specified ID or name exists.
* The `IN GROUP` clause specifies the ID or name of the workspace group that contains the workspace to delete.
* Specify the `WAIT ON TERMINATED` clause to pause query execution until the workspace is in the `TERMINATED` state.
* All the databases attached to a workspace are detached when the workspace is deleted (terminated).

## Example

The following command deletes a workspace named **examplews** in a workspace named **s2wsg**:

```sql
DROP WORKSPACE IF EXISTS 'examplews' IN GROUP 's2wsg';
```

***

Modified at: January 30, 2025

Source: [/cloud/reference/fusion-sql/drop-workspace/](https://docs.singlestore.com/cloud/reference/fusion-sql/drop-workspace/)

(An index of the documentation is available at /llms.txt)
