-
Notifications
You must be signed in to change notification settings - Fork 43
Open
Labels
Description
Related dev. issue(s): tarantool/tarantool#9112
Product: Tarantool
Since: 3.0
Root document: https://www.tarantool.io/en/doc/latest/reference/reference_sql/sql_statements_and_clauses/#alter-table
SME: @ ImeevMA
Details
Now, instead of just ALTER TABLE table DROP CONSTRAINT constraint;
we
have 8 operator variants:
- Statement to drop PRIMARY KEY, UNIQUE, tuple FOREIGN NEY or tuple
CHECK constraints:
ALTER TABLE tab_name DROP CONSTRAINT constr_name;
This statement cannot drop a constraint if constr_name
matches
more than one constraint.
- Statement to drop field FOREIGN NEY or field CHECK constraints:
ALTER TABLE tab_name DROP CONSTRAINT field_name.constr_name;
This statement cannot drop a constraint if constr_name
matches
more than one constraint for the field_name
field.
- Statement to drop PRIMARY KEY constraint:
ALTER TABLE tab_name DROP CONSTRAINT constr_name PRIMARY KEY;
- Statement to drop UNIQUE constraint:
ALTER TABLE tab_name DROP CONSTRAINT constr_name UNIQUE;
- Statement to drop tuple FOREIGN KEY constraint:
ALTER TABLE tab_name DROP CONSTRAINT constr_name FOREIGN KEY;
- Statement to drop tuple CHECK constraint:
ALTER TABLE tab_name DROP CONSTRAINT constr_name CHECK;
- Statement to drop field FOREIGN KEY constraint:
ALTER TABLE tab_name DROP CONSTRAINT field_name.constr_name FOREIGN KEY;
- Statement to drop field CHECK constraint:
ALTER TABLE tab_name DROP CONSTRAINT field_name.constr_name CHECK;
Requested by @ ImeevMA in tarantool/tarantool@263777d.
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity