Issue:
When you create table using sql like this.
SQL> create table ships
2 (
3 ship_id number ,
4 ship_name varchar2(20),
5 home_PORT_ID number,
6 constrain ships_ports_fk foreign key (home_port_id) references ports (po
t_id)
7 );
You may got following error message after execute.
constrain ships_ports_fk foreign key (home_port_id) references ports (port_id)
*
第 6 行出现错误:
ORA-00907: missing right parenthesis solution
Reason:
You may have something misspell.
Solution:
Please review your sql code to check if anything is misspelled. E.g. In my case, I misspell "constraint" as "constrain".
本文讨论了在使用SQL创建表时遇到的常见错误:ORA-00907:缺少右括号。通过分析示例代码,解释了错误原因,并提供了修正方法。重点在于检查SQL语句中是否存在拼写错误,特别是对于关键字的正确拼写。
978

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



