我创建了一个表作为流:
CREATE TABLE"COMMODITY"
(COM_NO VARCHAR2(10) NOT NULL,
COM_NAME VARCHAR2(100) NOT NULL,
SHOP_NO VARCHAR2(10)NOT NULL,
FRU_NO VARCHAR2(10)NOT NULL,
COM_PRICE NUMBER(10)NOT NULL,
COM_WEIGHT VARCHAR2(30)NOT NULL,
COM_REMARKS CLOB NOT NULL,
COM_PIC1 BLOB,
COM_PIC2 BLOB,
COM_PIC3 BLOB,
COM_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
COM_STATUS VARCHAR2(10) NOT NULL,
COM_STORE NUMBER(10) NOT NULL,
COM_SCORE NUMBER(2,1)NOT NULL,
COM_PEO NUMBER(10)NOT NULL,
CONSTRAINT COM_COM_NO_PK PRIMARY KEY (COM_NO),
CONSTRAINT COM_SHOP_NO_FK FOREIGN KEY (SHOP_NO) REFERENCES SHOP(SHOP_NO),
CONSTRAINT COM_FRU_NO_FK FOREIGN KEY (FRU_NO) REFERENCES FRUIT(FRU_NO)
);
并且序列是
CREATE SEQUENCE COM_NO_SEQ
INCREMENT BY 1
START WITH 1
NOMAXVALUE
NOCACHE
NOCYCLE;
我正在尝试执行以下操作:
INSERT INTO COMMODITY VALUES('COM'||LPAD(TO_CHAR(COM_NO_SEQ.NEXTVAL),7,'0'),'平安蘋果','SHO0000001','FRU0000001',1200,'一箱約1斤','好吃的蘋果喔我是CLOB','24-6月-17 03.22.39','上架',80,0,0);
我将值赋予了所有非空列。但仍然存在 ORA-00947 的问题:没有足够的值。
请告诉我为什么?