DROP SCHEMA
Syntax
DROP SCHEMA schema_name;Description
Arguments
schema_name
Examples
Drop a schema in the current database
demodb.public/demostore# show SCHEMAS;
+------------+-------------+------------+-------------------------------+
| Name | Is Default | Owner | Created At |
+============+=============+============+===============================+
| public | true | sysadmin | 2024-07-02 16:23:26 +0000 UTC |
+------------+-------------+------------+-------------------------------+
| otherdb | false | sysadmin | 2024-07-02 21:43:27 +0000 UTC |
+------------+-------------+------------+-------------------------------+
| newschema | false | sysadmin | 2024-07-03 15:32:21 +0000 UTC |
+------------+-------------+------------+-------------------------------+
demodb.public/demostore# DROP SCHEMA newschema;
+------------+------------------+------------+------------------------------------------+
| Type | Name | Command | Summary |
+============+==================+============+==========================================+
| schema | demodb.newschema | DROP | schema "demodb.newschema" was |
| | | | successfully dropped |
+------------+------------------+------------+------------------------------------------+
demodb.public/<no-store># LIST SCHEMAS;
+------------+-------------+------------+-------------------------------+
| Name | Is Default | Owner | Created At |
+============+=============+============+===============================+
| public | true | sysadmin | 2024-07-02 16:23:26 +0000 UTC |
+------------+-------------+------------+-------------------------------+
| otherdb | false | sysadmin | 2024-07-02 21:43:27 +0000 UTC |
+------------+-------------+------------+-------------------------------+Drop a schema in a specific database
Last updated

