[英]Oracle apex ORA-00905 and ORA-06512
I have the following SQL statement generated by MySQL Workbench.我有以下由 MySQL Workbench 生成的 SQL 语句。 When I run it on Oracle Apex i get these errors.
当我在 Oracle Apex 上运行它时,我得到了这些错误。 Can someone help identify the problem?
有人可以帮助确定问题吗?
ORA-00905: missing keyword
ORA-06512: at "SYS.WWV_DBMS_SQL_APEX_190200", line 592
ORA-06512: at "SYS.DBMS_SYS_SQL", line 1658
ORA-06512: at "SYS.WWV_DBMS_SQL_APEX_190200", line 578
ORA-06512: at "APEX_190200.WWV_FLOW_DYNAMIC_EXEC", line 2057
CREATE TABLE Stores (
Store_ID INT NOT NULL
CONSTRAINT Store_ID PRIMARY KEY,
Tipo VARCHAR(45) NOT NULL,
Name VARCHAR(45) NOT NULL,
FinancesOfficer_ID INT NOT NULL,
CONSTRAINT fk_Stores_Finances_Officers
FOREIGN KEY (FinancesOfficer_ID)
REFERENCES Finances_Officers (FinancesOfficer_ID)
ON DELETE NO ACTION
ON UPDATE NO ACTION,
Owner_ID INT NOT NULL,
CONSTRAINT fk_Stores_Store_Owners
FOREIGN KEY (Owner_ID)
REFERENCES Store_Owners (Owner_ID)
ON DELETE NO ACTION
ON UPDATE NO ACTION);
CREATE TABLE
statement would look as follows; CREATE TABLE
语句如下所示; I created two dummy master tables so that foreign key constraints have something to reference.我创建了两个虚拟主表,以便外键约束可以参考。
SQL> create table finances_officers (financesofficer_id int primary key);
Table created.
SQL> create table store_owners (owner_id int primary key);
Table created.
SQL>
SQL> create table stores
2 (store_id int,
3 tipo varchar2(45) not null,
4 name varchar2(45) not null,
5 financesOfficer_id int,
6 owner_id int,
7 --
8 constraint pk_sto primary key (store_id),
9 --
10 constraint fk_sto_finoff foreign key (financesofficer_id)
11 references finances_officers (financesofficer_id),
12 --
13 constraint fk_sto_own foreign key (owner_id)
14 references store_owners (owner_id)
15 );
Table created.
SQL>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.