ORA-00907: 创建外键 Oracle 12c 时缺少右括号
本文介绍了ORA-00907: 创建外键 Oracle 12c 时缺少右括号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想制作一个包含一个自动生成的主键和两个外键的表,但我遇到了这个错误......
<块引用>
第 1 行的错误:ORA-00907: 缺少右括号
然后,我尝试了这个:
<块引用>
第 1 行的错误:ORA-00907: 缺少右括号
仍然报同样的错误!
但是,如果我分两步进行:
<块引用>
表已更改.
任何人都可以帮我解决这个问题吗?
解决方案
在将内联约束定义为列定义的一部分时,您不需要说 foreign key
:
祝你好运.
I Want To Make a Table Which Include One Auto Generated Primary Key And Two Foreign Keys But I'm Facing This Error...
ERROR at line 1: ORA-00907: missing right parenthesis
Then, I tried this:
ERROR at line 1: ORA-00907: missing right parenthesis
It is still Giving Same Error!
But, if I do it in two steps:
Table altered.
Can anyone please get me out of this?
解决方案
When defining the constraint in-line as part of the column definition you don't need to say foreign key
:
Best of luck.
这篇关于ORA-00907: 创建外键 Oracle 12c 时缺少右括号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!