constraint nn not null 也是非空约束
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 语句会出错。
应用推荐