在线等:如何使用check实现三个字段不能同时为空的检查。(答贴给分)
现在要在postgre中创建一个数据表,如何实现非主键字段usremail usrtele usemphone三个字段不同时为空值,使用check关键字可以实现么?希望给出sql语句。 问题点数:100、回复次数:1Top
1 楼zheninchangjiang(徐若涵)回复于 2004-05-02 19:30:58 得分 100
alter table postgre add constraint chknull check (not (usremail is null and usrtele is null and nuemphone is null))Top




