Remove Check Constraints from an Existing Table

To remove a check constraint from a table, you use the alter table drop constraint statement:

Query:

ALTER TABLE table_name
DROP constraint constraint_name;

Output:

Remove Check Constraint.

Explanation: The following example drops the due_begin_date constraint.

MariaDB CHECK Constraint

MariaDB Server is one of the most popular open-source relational databases. It’s made by the original developers of MySQL and guaranteed to stay open source. It is part of most cloud offerings and the default in most Linux distributions.

MariaDB Server turns data into structured information in a wide array of applications, ranging from banking to websites. Originally designed as an, enhanced, drop-in replacement for MySQL, MariaDB Server is used because it is fast, scalable, and robust, with a rich ecosystem of storage engines, plugins, and many other tools that make it very versatile for a wide variety of use cases.

MariaDB is widely used to maintain high compatibility with open-source, with exact matching with MySQL APIs and commands. It includes new storage engines like Aria, ColumnStore, and MyRocks.

Similar Reads

CHECK Constraint

A CHECK constraint verifies that a value in a column or collection of columns meets a Boolean expression before adding or upgrading it. The general syntax of the MariaDB CHECK constraint by the following query:...

MariaDB Check Constraint Error

We’ll understand what type of ERROR arises from the CHECK constraint in the query and which will be explained with the help of a demonstrated example....

Define a Check Constraint That References to Multiple Columns

A check constraint can refer to multiple columns. In this case, you must define the check constraint as a table constraint....

Adding CHECK Constraints to an Existing Table

The alter table add constraint statement allows you to add a check constraint to an existing table:...

Remove Check Constraints from an Existing Table

To remove a check constraint from a table, you use the alter table drop constraint statement:...

Conclusion

MariaDB Server is a general purpose open source relational database management system. It’s one of the most popular database servers in the world. MariaDB Server is released under the GPLv2 open source license and is guaranteed to remain open source. It can be used for high availability, transaction data, analytics, as an embedded server, and a wide range of tooling and applications support MariaDB Server. So, In this article, we have discussed about Check Constraints, how to create it, add Check Constraints, remove Check Constraints and several examples related to it....

Contact Us