Vertica Drop Schema command

This action removes a schema from the database permanently. Syntax

DROP SCHEMA [db-name.]schema [, ...] [ CASCADE | RESTRICT ]
Parameters options:
  • db-name - is the database name where the schema resides
  • schema - schema to be droped.
  • CASCADE - drop the schema and the objects it contains
  • RESTRICT - only drops tha schema if empty (default)
  • We cannot drop a public schema Transactions using the objects inside the schema must complete before the schema can be droped. Schema owner can drop a schema even if the owner does not own all the objects within the schema. All the objects within the schema are also dropped. Examples
  • Default drop :
  • DROP SCHEMA S1;
  • Drop schema and all objects :
  • DROP SCHEMA S1 CASCADE;