Skip to Main Content

Oracle Database Discussions

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!

Add default Column as Boolean

user12028119Jul 16 2012 — edited Jul 16 2012
hi,
I have been using oracle default column feature from sometime and I found it very useful as it avoid large backfill process.
here is the command to add not null column with default value.

alter table Owner.table_name add (Column_name Varchar (32) default 'Sales' not null);


Question:-
recently one Developer came and asked about adding default boolean column with default FALSE value, I couldn't able to find the proper sql for this.
below sql is throwing an error, anyone who can help me to figure out whats wrong here, will be big help.

alter table Owner.table_name add (isactive char(1) check (isactive in ('TRUE','FALSE') default 'FALSE' not null));


thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 13 2012
Added on Jul 16 2012
3 comments
24,952 views