Re: Could I use user define function as default value of a column?

From: Lothar Armbrüster <>
Date: Tue, 08 Jul 2008 18:07:44 +0200
Message-ID: <>

"Jack.Lee" <> writes:

> I wanna add a user define function as default value of a column.But
> oracle raise an error.Could I do that?
> Thanks a lot!
> Jack.Lee

Oracle's documentation (for 11g) says:

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

Maybe you could use a before insert trigger to accomplish your needs.

Hope that helps,

Lothar Armbrüster  |
Hauptstr. 26       |
65346 Eltville     |
Received on Tue Jul 08 2008 - 11:07:44 CDT

Original text of this message