DROP CONSTRAINT
Function
This command deletes a CHECK constraint.
Syntax
ALTER TABLE [database_name.]table_name|DELTA.`obs://bucket_name/tbl_path`
DROP CONSTRAINT constraint_name
Parameter Description
| Parameter | Description |
|---|---|
| database_name | Name of the database, consisting of letters, numbers, and underscores (_) |
| table_name | Name of the table in the database, consisting of letters, numbers, and underscores (_) |
| bucket_name | OBS bucket name |
| tbl_path | Storage location of the Delta table in the OBS bucket |
| constraint_name | Constraint name |
Required Permissions
- SQL permissions
| Permission Description |
|---|
| ALTER permission on a table |
- Fine-grained permission: dli:table:alter
- Metadata services provided by LakeFormation. Refer to the LakeFormation documentation for details on permission configuration.
Example
alter table delta_table0 drop constraint const_price; alter table delta.`obs://bucket1/dbgms/h0` drop constraint const_id;
System Response
Displays whether the task is successfully executed in the execution history or job list.