CREATE TABLE sales_invoice -- missing or invalid option
(sales_invoice_no NUMBER(6) NOT NULL
CONSTRAINT sales_invoice_no_pk PRIMARY KEY
, cust_id NUMBER(6) NOT NULL
, CONSTRAINT sales_cust_invoice_fk FOREIGN KEY (cust_id)
REFERENCES customer(cust_id))
, art_id NUMBER(6) NOT NULL
, CONSTRAINT art_invoice_fk FOREIGN KEY (art_id)
REFERENCES art_sale(art_id)
, sales_emp_id NUMBER(6) NOT NULL
, CONSTRAINT sales_invoice_emp_fk (sales_emp_id)
REFERENCES sales_emp(emp_id)
, manager_emp_id NUMBER(6)
, CONSTRAINT manager_invoice_emp_fk (manager_emp_id)
REFERENCES manager_emp(emp_id)
, sales_invoice_amount NUMBER (10)
CONSTRAINT sales_amount_check CHECK (sales_invoice_amount > 0));
當我嘗試運行此操作時出現此錯誤。我試圖創建一個表格,從其他幾張表格中抽取出來並作爲銷售發票打印出來。提前致謝。「ORA-00922:缺失或無效的選項」SQL創建表錯誤
我發現一個問題 - 我在sales_emp_id和manager_emp_id之前缺少FOREIGN KEY。但我補充說,仍然失蹤或無效的感染 –
不幸的是,我們真的無法幫助您遠程調試。你還沒有提供足夠的信息... – jpaljasma