我正在尝试创建一个表,我只能为INT提供正值,我该怎么做?
CREATE TABLE Ingredients( IngredientID INTEGER PRIMARY KEY NOT NULL,IngredientName VARCHAR(255),IngredientClassID SMALLINT NOT NULL,MeasureAmountID SMALLINT NOT NULL );
解决方法
试试这个…
CREATE TABLE Ingredients( IngredientID INTEGER PRIMARY KEY,MeasureAmountID SMALLINT NOT NULL,CHECK (IngredientClassID>0),CHECK (MeasureAmountID>0) );