1.检查约束
在定义数据表时候,加入检查约束。
CRATE TABLE student( id serial, name varchar(10), scrore integer CHECK (scrore > 0));
2.not null
3.unique
4.主键
5.外键
6.default