Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

modify table column

Status
Not open for further replies.

tsp120

Programmer
May 21, 2003
52
US
I expect this should be an easy issue, I just can't find anything on the net to give me a definite answer.

I have a table 'sources' with a column 'status'. I believe that the default value for this column is 'N', but I'm not sure. How can I see this? If I do:

Code:
Desc sources;

it does not show default values.

Secondly, I want to change the default value to NULL. How do I do this?

Thanks.
 
Hi,
Try:
Code:
Alter table sources modify status default NULL;



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Query user_tab_columns to see the default values:
Code:
SELECT column_name,data_default 
  FROM user_tab_columns
 WHERE table_name = 'SOURCES'

Stefan
 
Thanks. I figured it would work like that.

However, is there any way I can see what the default value is on a column to make sure I did it correctly?

Thanks again.
 
N/M, already answered. Thanks!

Everything works fine now.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top