8. DROP TABLE#

8.1. Synopsis#

DROP TABLE [ IF EXISTS ]

{ <entries> | <find_expression> } [, ... ]

find_expression ::=
  FIND (
    { TAG = <tag_value> | NOT TAG = <tag_value>
      | PREFIX = 'prefix' | SUFFIX = 'suffix' | TYPE = TS }
    [ AND ... ] [ , RECURSIVE = { TRUE | FALSE } ]
  )

tag_value ::= { 'text' | $table } [ || ... ]

8.2. Description#

DROP TABLE removes one or more tables from the QuasarDB cluster. The statement fails if a specified table does not exist. Use IF EXISTS to prevent this error. QuasarDB runs the statement immediately and does not request confirmation. The statement is transactional.

8.3. Parameters#

entries

The names of the tables to remove.

find_expression

Selects multiple tables with a key/value lookup. For more information, refer to key/value lookups.

8.4. Examples#

Drop a table:

DROP TABLE example

Drop all tables that have the nyse tag:

DROP TABLE FIND(tag='nyse')

Drop a table without failing if it does not exist:

DROP TABLE IF EXISTS example