create table约束

create table student(

  sage smallint CHECK (sage between 17 and 22),

  ssex char(2) check(ssex in('男','女'))

);

原文地址:https://www.cnblogs.com/xiongji/p/3734916.html