CREATE TABLE ITEM
(
ITEMCODE CHAR(2) PRIMARY KEY,
ITEMNAME VARCHAR(20) NOT NULL,
UNIT_MEASURE VARCHAR(10) CHECK (UNIT_MEASURE IN ('MTR','KG','TONN','LTR','NOS')),
RATE NUMBER(10,2) CHECK (RATE > 0),
STOCK NUMBER(10,2),
MINSTOCK NUMBER(10,2),
MAXSTOCK NUMBER(10,2),
DRAWINGSP VARCHAR(10) DEFAULT 'DR1000',
CHECK (STORE BETWEEN MINSTOCK AND MAXSTOCK) );
答案 0 :(得分:1)
CREATE TABLE ITEM
(
ITEMCODE CHAR(2) PRIMARY KEY,
ITEMNAME VARCHAR(20) NOT NULL,
UNIT_MEASURE VARCHAR(10) CHECK (UNIT_MEASURE IN ('MTR','KG','TONN','LTR','NOS')),
RATE NUMERIC(10,2) CHECK (RATE > 0),
STOCK NUMERIC(10,2),
MINSTOCK NUMERIC(10,2),
MAXSTOCK NUMERIC(10,2),
DRAWINGSP VARCHAR(10) DEFAULT 'DR1000',
CHECK (STOCK BETWEEN MINSTOCK AND MAXSTOCK)
);
NUMBER
- >更改为numeric
STORE
- >更改为STOCK