Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Use a trigger to remove NULL values?
CJ wrote:
> First of all I would like to thank all of you for your answers and
> sorry regarding the late replay. I do agree that easiest way would be
> to "Fix the application. Treat the disease. Not the symptom." as
> mentioned by DA Morgan below. However, that is currently the problem. I
> do not have access to the source code, and it will take some time until
> I do have access to this.
>
> I do see the issue with "silent" deletion, which can create further
> issues in the future. I will therefore test and see if the NULL
> contraint breakes the application.
>
> Thanks again,
>
> Regards,
> CJ
Another possibility ... alter the tables to provide a DEFAULT similar to the following:
CREATE TABLE t (
col1 VARCHAR2(2),
col2 DATE DEFAULT SYSDATE NOT NULL);
INSERT INTO t (col1) VALUES ('ZZ');
SELECT * FROM t;
Note that no value was provided for col2.
-- Daniel A. Morgan http://www.psoug.org damorgan_at_x.washington.edu (replace x with u to respond)Received on Mon Feb 13 2006 - 11:36:50 CST