Skip to main content

DROP RELATION

Commands › Relations · Admins only, through sercha_define or a tenant file

Removes a relation of the model and the view that holds its rows. For an inferred relation, the judge's verdicts go too.

Syntax​

DROP RELATION [ IF EXISTS ] <name>

Parameters​

ParameterDescription
<name>The relation, as SHOW MODEL lists it.
IF EXISTSSucceed with a message when there is no such relation.

Usage notes​

  • Drop a relation before either entity it relates: DROP ENTITY is refused while a relation names the entity.

Examples​

DROP RELATION IF EXISTS placed
result
relation placed dropped

Not supported​

RefusedWrite instead
A relation named with its endsThe relation's name alone
-- Refused by the engine
DROP RELATION placed (Customer places Order)

See also​

CREATE RELATION · REFRESH RELATION · DROP ENTITY · SHOW MODEL