How to remove constraints from my MySQL table?

前端 未结 12 1489
北恋
北恋 2020-11-30 18:03

I want to remove constraints from my table. My query is:

ALTER TABLE `tbl_magazine_issue` 
DROP CONSTRAINT `FK_tbl_magazine_issue_mst_users`
<
12条回答
  •  广开言路
    2020-11-30 19:04

    For those that come here using MariaDB:

    Note that MariaDB allows DROP CONSTRAINT statements in general, for example for dropping check constraints:

    ALTER TABLE table_name
    DROP CONSTRAINT constraint_name;
    

    https://mariadb.com/kb/en/library/alter-table/

提交回复
热议问题