CREATE TABLE T_FAX
( "ID" NUMBER(12,0) NOT NULL ENABLE,
"ordercode" VARCHAR2(20) NOT NULL ENABLE,
"faxAction" VARCHAR2(20) NOT NULL ENABLE,
"faxContentUrl" VARCHAR2(20) NOT NULL ENABLE,
"faxSuccessTime"VARCHAR2(20),
"faxStatus" VARCHAR2(20),
CONSTRAINT "PK_T_FAX" PRIMARY KEY ("ID")
)
COMMENT ON COLUMN "HTL_DELIVERY"."T_FAX"."ID" IS '主键ID';
COMMENT ON COLUMN "HTL_DELIVERY"."T_FAX"."ordercode" IS '订单编码';
COMMENT ON COLUMN "HTL_DELIVERY"."T_FAX"."faxAction" IS '传真动作';
COMMENT ON COLUMN "HTL_DELIVERY"."T_FAX"."faxContentUrl" IS '传真内容图片url';
COMMENT ON COLUMN "HTL_DELIVERY"."T_FAX"."faxSuccessTime" IS '传真发送/回传成功时间';
COMMENT ON COLUMN "HTL_DELIVERY"."T_FAX"."faxStatus" IS '状态';
CREATE SEQUENCE SEQ_FAX
INCREMENT BY 1 -- 每次加几个
START WITH 1 -- 从1开始计数
NOMAXVALUE -- 不设置最大值
NOCYCLE -- 一直累加,不循环
创建后插入数据时,老是出现 ora-00904 标识符无效
解决方法:
CREATE TABLE T_FAX
(
id NUMBER(12,0) NOT NULL ENABLE,
ordercode VARCHAR2(20) NOT NULL ENABLE,
faxAction VARCHAR2(20) NOT NULL ENABLE,
faxContentUrl VARCHAR2(20) NOT NULL ENABLE,
faxSuccessTime VARCHAR2(20),
faxStatus VARCHAR2(20),
CONSTRAINT "PK_T_FAX" PRIMARY KEY (id)
)
把引号去掉,引号大小写敏感