Jorge Lobo Arteaga
> *Cc:* pgsql-es-ayuda@postgresql.org
> *Asunto:* Re: [pgsql-es-ayuda] Constraint Check de varios campos en
> varias combinaciones
>
> Hola Jorge
>
> Pruebe con esto:
>
>
> create table predio(
> tipo integer not null,
> nom varchar(40),
> a
Hola Jorge
Pruebe con esto:
create table predio(
tipo integer not null,
nom varchar(40),
apto char(6),
constraint ck_tipo_predio_de_1_a_5 check(tipo >= 1 and tipo<=5),
constraint ck_other check (case when tipo in (1,2) then nom is null
and apto is null
when tipo in