游客发表

MySQL 8 中检查约束的使用

发帖时间:2025-11-04 23:53:31

MySQL 8 中检查约束的使用
复制CREATETABLE users (  id intnotnull auto_increment,检查  firstname varchar(50) notnull,  lastname varchar(50) notnull,  age TINYINT unsigned notnullCONSTRAINT `check_1` CHECK (age > 15),  gender ENUM(M, F) notnull,  primarykey (id)  ) engine = innodb;  1.2.3.4.5.6.7.8.

    热门排行

    友情链接