Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Custom functions in DDL for default column values ?
"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