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')

Could do the trick, right? If you want, you can be more aggressive and go for

    check can_discount='no' or ((job='dealer' or job='agent') and
can_discount='yes')

On Thu, Nov 26, 2015 at 11:38 AM, Simon Slavin <slavins at bigfraud.org> wrote:
>
> On 26 Nov 2015, at 1:36pm, Bernardo Sulzbach <mafagafogigante at gmail.com> 
> wrote:
>
>> I am not against this feature request, Simon. But enlighten my why
>> this cannot be done with a CHECK constraint? I may be missing
>> something very simple. Thanks.
>
> Can you refer to another table in a CHECK constraint ?  It never occurred to 
> me.
>
> Simon.
> _______________________________________________
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users



-- 
Bernardo Sulzbach

Reply via email to