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

Home -> Community -> Usenet -> c.d.o.server -> Re: Custom functions in DDL for default column values ?

Re: Custom functions in DDL for default column values ?

From: Michel Cadot <micadot{at}altern{dot}org>
Date: Fri, 28 Jan 2005 18:12:32 +0100
Message-ID: <41fa726d$0$6085$626a14ce@news.free.fr>

"Curmudgeon" <richard.a.elliott_at_williams.com> a écrit dans le message de news:1106930973.600058.221060_at_z14g2000cwz.googlegroups.com...
| Is it possible to set a default for a colume to be a custom function ?
|
| In other words instead of the function sysdate, could I write my own
| function and set the default to myfunction ?
|
| I know I can do something very similar in a trigger, but it's a lot
| easier for me to change DDL than application trigger source code.
|

From doc:

Restriction on DEFAULT: A DEFAULT expression cannot contain references to PL/SQL functions or to other columns, the pseudocolumns LEVEL, PRIOR, and ROWNUM, or date constants that are not fully specified.

Regards
Michel Cadot Received on Fri Jan 28 2005 - 11:12:32 CST

Original text of this message

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