Home > Archive > Other Oracle database topics > November 2005 > How to drop a default value for a column









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author How to drop a default value for a column
Kalle

2005-11-29, 3:23 am

Hi all,

I have a table

xxx

col1 varchar2(10) default 'x' null,
col2 varchar2((100) not null
/

now I would like to drop the default value for col1

How to do it?

rgds
Kalle


Michael O'Shea

2005-11-29, 3:23 am

Hi Kalle

ALTER TABLE xxx
MODIFY (col1 DEFAULT NULL);

Regards

Mike O'Shea
http://www.strychnine.co.uk


Kalle wrote:
> Hi all,
>
> I have a table
>
> xxx
>
> col1 varchar2(10) default 'x' null,
> col2 varchar2((100) not null
> /
>
> now I would like to drop the default value for col1
>
> How to do it?
>
> rgds
> Kalle


Kalle

2005-11-29, 7:23 am

Thanks Mike,

I was looking the ansi standard sql where it was mentioned that alter table
modify (col1 default drop) should work but it didn't

cheers
Kalle



Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com