On 26 Nov 2015, at 1:52pm, Bernardo Sulzbach <mafagafogigante at gmail.com> 
wrote:

> I did not mean that. But if you want to check that a certain row has a
> valid value like you described,
> 
>    check ((job='dealer' or job='agent') or can_discount='no')

That works only when the "job" column is in the table the constraint is in.  In 
my case, there are two tables: client and sale.  The "job" column is in the 
client table, but it's the sale table where I need to know if the client 
deserves a discount.

Simon.

Reply via email to