How to solve the problem of "ORA-00922: missing or invalid option" error?
P粉668804228
P粉668804228 2023-08-22 18:45:24
0
2
878
<p>I entered the following SQL command in Oracle, but it reported the error "ORA-00922: Option is missing or invalid"</p> <pre class="brush:php;toolbar:false;">CREATE TABLE Student ( StuID NUMBER(15), StuName VARCHAR2(50), Phone VARCHAR2(20), PRIMARY KEY (StuID)) CREATE TABLE Program ( ProCode VARCHAR2(12), ProTitle VARCHAR2(50), PRIMARY KEY (ProCode))</pre> <p>Why? ? ? </p>
P粉668804228
P粉668804228

reply all(2)
P粉242535777
创建表 Student (
    StuID     NUMBER(15),
    StuName   VARCHAR2(50),
    Phone     VARCHAR2(20),
    CONSTRAINT PK_STUID PRIMARY KEY (StuID))

Find the answer here here.

edit:

Also, try using / as statement separator instead of ;

P粉099145710

If you are using OracleXE's horrible HTML GUI (inside the browser), then it does not support running multiple statements.

Please use SQL Developer, SQL*Plus or any other GUI tool instead.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template