Search Postgresql Archives

Re: constraint -- one or the other column not null

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Sep 06, 2006 at 12:04:18AM -0700, George Pavlov wrote:
> I have two columns, both individually nullable, but a row needs to have
> a value in one or the other. What is the best way to implement the
> constraints?

check (a is null != b is null);


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux