4. Drop table#

4.1. Synopsis#

DROP TABLE [ IF EXISTS ]

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

find_expression ::=
  FIND ( { <tag_expression> | NOT <tag_expression> } [ AND ... ] )

tag_expression ::=
  TAG = 'tag_name'

4.2. Description#

DROP TABLE will drop one or more existing table from your QuasarDB cluster. Fails if entries do not exist, unless IF EXISTS is specified. The statement is executed immediately and does not require confirmation, so use with caution. The statement is transactional.

4.3. Parameters#

entries

The name of the entries that will be dropped.

find_expression

When your tables are tagged, you can use inline key/value lookups to perform your query over multiple tables. To match all tables that have the tag “stocks”, you can use FIND(tag='stocks' AND type=ts).

4.4. Examples#

Drop a table:

DROP TABLE example

Drop all table tagged with ‘nyse’:

DROP TABLE FIND(tag='nyse')

Drop a table without failing if it does not exist:

DROP TABLE IF EXISTS example