DROP SCHEMA

DROP SCHEMA drops a schema previously set up using CREATE SCHEMA.

Syntax

Notes

If the schema contains any objects, the command will fail unless the CASCADE option is specified. The default is RESTRICT.

Examples

0: jdbc:sqlstream:> create schema fred;
No rows affected (0.227 seconds)
0: jdbc:sqlstream:> create view fred.test as select stream * from sales.bids;
No rows affected (1.169 seconds)
0: jdbc:sqlstream:> drop schema fred;
Error: Dropping schema "LOCALDB"."FRED" requires CASCADE because other objects still reference it (state=,code=0)
0: jdbc:sqlstream:>
0: jdbc:sqlstream:> drop schema fred cascade;
No rows affected (0.992 seconds)