Constraints Supports, primary, foreign, unique, not null constraint.
约束支持主键、外键、惟一和非空约束。
If a NOT NULL constraint is specified, then the column must have a default value other than NULL.
如果规定一个不允许有空值是一个约束,那么字段必须有一个不同于空值的默认值。
So in the example above, the NOT NULL constraint would get violated, and the INSERT statement would error out.
因此,在上面的示例中,会违反NOT NULL约束,INSERT语句会出错。
In Oracle 10g, if there is a BEFORE INSERT TRIGGER and a NOT NULL constraint on a table, then the BEFORE TRIGGER is executed first, and then the constraint check is performed.
在Oracle10g中,如果表上同时存在BEFORE INSERT触发器和NOT NULL约束,那么先执行BEFORE触发器,然后执行约束检查。
For example, if a before trigger supplies value to a NOT NULL column, then the before trigger is executed first and a value is supplied to the column so that the NOT NULL constraint isn't violated.
例如,如果一个BEFORE触发器给一个NOT null列提供值,那么先执行BEFORE触发器,给列提供值,所以不会违反NOT NULL约束。
The itemNumber column provides a unique identity for each item (or row) and has an attached column-level constraint that enforces a valid value to always be supplied (NOT NULL).
itemNumber列提供了每个商品(或列)的惟一标识,它上面还有列级约束,强制要求提供正确的值(NOT NULL)。
A workaround to this is to supply a default value to the not NULL column whose value comes from a BEFORE INSERT TRIGGER, so that the constraint is not violated.
一种解决方法是给从BEFORE INSERT触发器取得值的NOT null列提供默认值,这样就不会违反约束。
A workaround to this is to supply a default value to the not NULL column whose value comes from a BEFORE INSERT TRIGGER, so that the constraint is not violated.
一种解决方法是给从BEFORE INSERT触发器取得值的NOT null列提供默认值,这样就不会违反约束。
应用推荐