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
| Parameter | Description |
|---|---|
<name> | The relation, as SHOW MODEL lists it. |
IF EXISTS | Succeed with a message when there is no such relation. |
Usage notes
- Drop a relation before either entity it relates:
DROP ENTITYis refused while a relation names the entity.
Examples
DROP RELATION IF EXISTS placed
| result |
|---|
| relation placed dropped |
Not supported
| Refused | Write instead |
|---|---|
| A relation named with its ends | The relation's name alone |
-- Refused by the engine
DROP RELATION placed (Customer places Order)
See also
CREATE RELATION · REFRESH RELATION · DROP ENTITY · SHOW MODEL