oracle apex ora-00905和ora-06512

wz1wpwve  于 2021-07-26  发布在  Java
关注(0)|答案(1)|浏览(436)

我有以下由mysql工作台生成的sql语句。当我在oracleapex上运行它时,我得到了这些错误。有人能帮忙找出问题吗?

  1. ORA-00905: missing keyword
  2. ORA-06512: at "SYS.WWV_DBMS_SQL_APEX_190200", line 592
  3. ORA-06512: at "SYS.DBMS_SYS_SQL", line 1658
  4. ORA-06512: at "SYS.WWV_DBMS_SQL_APEX_190200", line 578
  5. ORA-06512: at "APEX_190200.WWV_FLOW_DYNAMIC_EXEC", line 2057
  6. CREATE TABLE Stores (
  7. Store_ID INT NOT NULL
  8. CONSTRAINT Store_ID PRIMARY KEY,
  9. Tipo VARCHAR(45) NOT NULL,
  10. Name VARCHAR(45) NOT NULL,
  11. FinancesOfficer_ID INT NOT NULL,
  12. CONSTRAINT fk_Stores_Finances_Officers
  13. FOREIGN KEY (FinancesOfficer_ID)
  14. REFERENCES Finances_Officers (FinancesOfficer_ID)
  15. ON DELETE NO ACTION
  16. ON UPDATE NO ACTION,
  17. Owner_ID INT NOT NULL,
  18. CONSTRAINT fk_Stores_Store_Owners
  19. FOREIGN KEY (Owner_ID)
  20. REFERENCES Store_Owners (Owner_ID)
  21. ON DELETE NO ACTION
  22. ON UPDATE NO ACTION);
zed5wv10

zed5wv101#

CREATE TABLE 声明如下:;我创建了两个虚拟主表,以便外键约束可以引用。

  1. SQL> create table finances_officers (financesofficer_id int primary key);
  2. Table created.
  3. SQL> create table store_owners (owner_id int primary key);
  4. Table created.
  5. SQL>
  6. SQL> create table stores
  7. 2 (store_id int,
  8. 3 tipo varchar2(45) not null,
  9. 4 name varchar2(45) not null,
  10. 5 financesOfficer_id int,
  11. 6 owner_id int,
  12. 7 --
  13. 8 constraint pk_sto primary key (store_id),
  14. 9 --
  15. 10 constraint fk_sto_finoff foreign key (financesofficer_id)
  16. 11 references finances_officers (financesofficer_id),
  17. 12 --
  18. 13 constraint fk_sto_own foreign key (owner_id)
  19. 14 references store_owners (owner_id)
  20. 15 );
  21. Table created.
  22. SQL>
展开查看全部

相关问题