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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Removing default

Status
Not open for further replies.

chidi

Technical User
Mar 24, 2003
42
NG
I created a table with certain fields and some defaults.
Example: create table T (
first_name varchar2(25) default 'John');
If I need to remove this default, is there a simpler way of doing it?
thanks in advance
 
You have probably found that doing something like;

Code:
alter table t
   modify first_name varchar2(20);
[\code]

doesn't work... the default still exists. You can do a couple of things that will have the effect of removing the default:

[code]
alter table t
   modify first_name varchar2 default '';

or

alter table t
   modify first_name varchar2 default NULL;
[\code]
 
Whoops, in my examples I left off the

(20)

after the varchar2

sorry.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top