错误消息
(ORA-00922:选项丢失或无效)
当我尝试在Oracle SQL中运行此代码时出现:
CREATE TABLE products {
product_id number not null,
name varchar(50),
product_cost number(5,2),
product_retail number(5,2),
product_type varchar(10),
store_id number not null,
CONSTRAINT product_pk PRIMARY KEY (product_id) }
答案 0 :(得分:2)
您需要将{}
更改为()
:
CREATE TABLE products (
product_id number not null,
name varchar2(50), -- varchar2
product_cost number(5,2),
product_retail number(5,2),
product_type varchar2(10),
store_id number not null,
CONSTRAINT product_pk PRIMARY KEY (product_id) );