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!

alter table modify column to a default value

user11979518Jul 3 2012 — edited Jul 3 2012
Hi Guys,

I want to alter a column in a table to default a value to 1.

I used the following syntax:

ALTER TABLE schema.table_name MODIFY(column5 DEFAULT 1);

But when I do the desc schema.table_name on sqlplus...

I dont see that default value:

That is :


SQL> desc schema.table_name
Name Null? Type
----------------------------------------- -------- ----------------------------
column1 NOT NULL CHAR(5)
column2 VARCHAR2(15)
column3 VARCHAR2(25)
column4 NUMBER(6)
column5 NUMBER(1)
column6 NUMBER(13)

How do I see if the values where defaulted on that column?

Or it will be handled during the inserts?

Please Help !!!!!!!!!!!

Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 31 2012
Added on Jul 3 2012
4 comments
125,519 views