在Oracle中具有特殊字符的放置约束 [英] Drop constraint with special character in Oracle
本文介绍了在Oracle中具有特殊字符的放置约束的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要删除一个约束,但是它的名称中有一个特殊字符.
I need to drop a constraint, but it has a special character in its name.
这是问题所在
ALTER TABLE USER_AEROPORTS DROP CONSTRAINT FK_ACC_V_MOA-USU_AEROP;
此操作失败
ORA-01735: invalid ALTER TABLE option
我相信它是约束名称中的-
.
I believe it is the -
in the constraint name.
如何删除约束?我要删除约束,而不是列.
How can I drop the constraint? I want to drop the constraint, not the column.
推荐答案
您可以将约束名称双引号:
You can double-quote the constraint name:
ALTER TABLE USER_AEROPORTS DROP CONSTRAINT "FK_ACC_V_MOA-USU_AEROP";
这篇关于在Oracle中具有特殊字符的放置约束的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文