select * from all_constraints where table_name = 'TABLENAME';
select * from User_Cons_Columns where table_name = 'TABLENAME';
alter table TABLENAMEdrop constraint SYS_C006694;--删除约束
本文介绍如何使用SQL语句查看和删除数据库表中的约束,包括通过查询all_constraints和User_Cons_Columns视图来获取约束信息,以及使用ALTER TABLE语句删除特定约束。
select * from all_constraints where table_name = 'TABLENAME';
select * from User_Cons_Columns where table_name = 'TABLENAME';
alter table TABLENAMEdrop constraint SYS_C006694;--删除约束

被折叠的 条评论
为什么被折叠?