Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Default column

483236Jun 26 2008 — edited Jun 27 2008
Hi

Tell me, Is possible to create a default column value that depends on the value of the first column?:

CREATE TABLE SEC.TEST_IF
(
CODE NUMBER(1),
STATUS VARCHAR2(2) DEFAULT DECODE(CODE,1,'AA',2,'BI',3,'BE')
)
NOMONITORING;

I can resolve it by using a trigger but, I remember have seen this before.

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jul 25 2008
Added on Jun 26 2008
3 comments
931 views