DROP STREAM

Documentation

VoltDB Home » Documentation » Using VoltDB

DROP STREAM

DROP STREAM — Removes a stream and, optionally, any views associated with it.

Synopsis

DROP STREAM stream-name [IF EXISTS] [CASCADE]

Description

The DROP STREAM statement deletes the specified stream from the database. The IF EXISTS clause allows the statement to succeed even if the specified stream does not exist. If the stream does not exist and you do not include the IF EXISTS clause, the statement will return an error.

If you use the CASCADE clause, VoltDB automatically drops any referencing views as well as the stream itself.

Example

The following example uses DROP STREAM with the IF EXISTS clause to remove the MeterReadings stream definition.

DROP STREAM MeterReadings IF EXISTS;