insert a row with all values default
prashant, May 08, 2002 - 1:59 am UTC
Hi Tom,
This question has been bothering me since long. How one could put a row in a table with all values default, had the table been defined like that. The same problem is with a procedure where if I provide default values to all the parameters and if i want to call it with those values. You have mentioned the possibility in answer to this query but have not in clear terms rejected the possibility. So please answer.
May 08, 2002 - 7:28 am UTC
In 9i, you could:
insert into t (c1) values ( DEFAULT );
In 8i and before, you cannot (to what end would a row with all default values be useful anyway??)
I do not understand the second part:
The same
problem is with a procedure where if I provide default values to all the
parameters and if i want to call it with those values.
Are you asking "how do i pass the defaults?" If so, the answer is "just don't pass ANYTHING and the defaults are passed"
Removing defaults
Michael, June 23, 2005 - 11:36 am UTC
I have a table in which 47 columns have a specified default value. The table owner now wants the default removed from 20 of these columns. How do I do this? I tried:
alter table x
modify( column_1 default null);
but this sets the default now to null.
thanks
June 23, 2005 - 6:53 pm UTC
that is the only way to do it, once it is defaulted, it will always have a default forever, even if the default is the "default" default of null.