| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Trigger question
In article <393D4AB2.8E71E0BB_at_Unforgetable.com>,
Walter T Rejuney <BlueSax_at_Unforgetable.com> wrote:
> Datebase: 8i Release 2
> OS: Solaris 2.6
>
> I have a column in a table that is defined as VARCHAR2(1). The legal
> values for this column are 'Y', 'N' or NULL and these are enforced by
a
> check constraint.
>
> In most cases (about 80%) the column will have a 'N' and in my
> application a null will be treated as if it were a 'N'. That being the
> case I would like to do a pre-insert trigger which would intercept any
> 'N' value and insert a NULL instead so that in reality the table would
> only ever have a 'Y' or a NULL. Is it legal to do this in a trigger?
>
yes it is.
> The application folks already know that they must interpret a NULL
just
> as if it were 'N', so I don't see any repercussions there, but are
there
> other repercussions that I need to think about?
>
none that I can think of.
-- Thomas Kyte (tkyte_at_us.oracle.com) Oracle Service Industries Howtos and such: http://osi.oracle.com/~tkyte/index.html Oracle Magazine: http://www.oracle.com/oramag Opinions are mine and do not necessarily reflect those of Oracle Corp Sent via Deja.com http://www.deja.com/ Before you buy.Received on Tue Jun 06 2000 - 00:00:00 CDT
![]() |
![]() |