| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: UNIQUE and NULL in SQL
gstrader_at_yahoo.com (Gary Strader) wrote in message news:<681fb18d.0201151240.4f9e267c_at_posting.google.com>...
> brian-l-smith_at_uiowa.edu (Brian Smith) wrote in message news:<60360d48.0112291928.2e7c5818_at_posting.google.com>...
> > I want the fourth insert statement above to succeed while still
> > enforcing the UNIQUE constraint for non-null columns. Is that
> > possible?
>
> Yes - write an insert trigger to check it. And ignore the
> admonishments as to whether it's "correct" to do so since you probably
> don't have the luxury to theorize about it.
I was hoping for a solution that would work on both PostgreSQL and Oracle. Oracle won't let a person create an insert trigger that issues a SELECT statement on the table to which the trigger belongs.
Thanks anyway,
Brian
Received on Tue Jan 15 2002 - 21:07:48 CST
![]() |
![]() |