0

it keeps on saying missing or invalid option (im new to oracle).

create table orders(
    ORD_NUM NUMBER(6,0),
    ORD_AMOUNT NUMBER(12,2),
    ADVANCE_AMOUNT NUMBER(12,2),
    ORD_DATE DATE,
    CUST_CODE CHAR(6),
    AGENT_CODE CHAR(6),
    ORD_DESCRIPTION CHAR(60),
    constraint PK_ORDNUM PRIMARY KEY(ORD_NUM),
    CONSTRAINT FK_CUSTCODE FOREIGN KEY(CUST_CODE) REFERENCES customer(CUST_CODE),
    CONSTRAINT FK_AGENTCODE FOREIGN KEY(AGENT_CODE) REFERENCES agents(AGENT_CODE)
);

this usually works on MySQL but when i tried doing it on oracle is just doesn't work for me

D3R
  • 1
  • All tables u refer on exists? (customer, agents) – toffler Mar 22 '22 at 16:03
  • 1
    Is your question about MySQL or about Oracle? Please use only the tags that indicate the technology you have troubles with. It is ok to mention in the question body that it works in MySQL but what is the relevance of MySQL Workbench or of the `mysql` tag when you want to run this query on Oracle? – axiac Mar 22 '22 at 16:04
  • It's also helpful to give the full error message, including any code/number - presumably in this case "ORA-00922: missing or invalid option". You haven't said exactly how you are running this, but it's likely it's a client issue - you *probably* just need to remove the semicolon at the end. – Alex Poole Mar 22 '22 at 16:15
  • Where do you get this error - in the apex sql workshop ? – Koen Lostrie Mar 22 '22 at 16:27

0 Answers0