Default column
483236Jun 26 2008 — edited Jun 27 2008Hi
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.