DROP SCHEMA

<< Click to Display Table of Contents >>

Navigation:  Streaming SQL Reference Guide > DROP statements >

DROP SCHEMA

Previous pageReturn to chapter overviewNext page

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

Syntax

dropschema

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 table fred.test(c1 varchar(4), primary key (c1));

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)