Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Trigger question

Trigger question

From: Walter T Rejuney <BlueSax_at_Unforgetable.com>
Date: 2000/06/06
Message-ID: <393D4AB2.8E71E0BB@Unforgetable.com>#1/1

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?

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? Received on Tue Jun 06 2000 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US