> Dear Ari,
> I wish you a marry x-mas and a very happy new year - 1999.
> I know that You are busy with other works, if time permits and possible,
> please clarify my doubt.
> I have a situation here. I want to fill up one of the columns of my table
> with sequence number from the sequence. I have not defined it as a primary
> key or unique key. When  I create a table with default clause for that
> column, oracle is giving syntax error saying that pseudo columns or
> reference to functions or procedures not allowed here. Is there any other
> way to accomplish this task. Or Oracle 8 will allow.
> Simply, How can I include dynamic values in the default clause of create
> table command.
> Please reply back to the same mail id.
> Yours
> Palani.

I do not remember if I have previously answered your question. If not,
then happy new year.

I do not know of any way to include a default value for an Oracle table. What
I personally do is add a BEFORE TRIGGER on the table. Then, I check if the
new.COLUMN_NAME is not null. If it is NULL, then I set the column to whatever
default value I choose, such as a sequence number (SEQUENCE_NAME.nextval).

Hope this helps!

-Ari Kaplan
Independent Oracle DBA Consultant

<-> For 245+ Oracle tips, visit my Web Page:                      <->
<->                                                               <->
<->             www.arikaplan.com                                 <->
<->                                                               <->
<->             email: akaplan@interaccess.com                    <->

Back to Ari Kaplan's Home Page tm">Back to Ari Kaplan's Home Page