我需要一个仅在主键存在时才可以删除主键的查询。
ALTER TABLE tablename DROP PRIMARY KEY;
如果不存在,这将返回错误,但我的要求是在不同的数据库中运行查询。
mysql constraints
constraints ×1
mysql ×1