如果我在Postgresql中有一个表:
create table Education (
id integer references Profiles(id),
finished YearValue not null,
started YearValue,
qualification text,
schoolName text,
studiedAt integer references Organizations(id),
primary key (id)
);
我需要设置一个约束,这样schoolName
或studiedAt
中的任何一个都不需要为空(其中一个必须包含信息)。
我该怎么做呢?
https://stackoverflow.com/questions/5447880
复制相似问题