I have a table created as
create table test
(test_default number(4));
Now, I have to add default value 8888 to the column if the length of inserted value is greater than 4.
I have tried
alter table test modify test_default DEFAULT 8888 when length(test_default)>4 ;
but this does not work. I'm not sure if this can be done.