Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2003

    Unanswered: 2 Quick Default Value Questions

    Hi all...2 really quick question on default values.

    1 - Can I put a default value on a column in a table that is already populated? For some reason, I get strange errors when trying to do this
    ie, ORA-00984 Column Not Allowed Here.

    How can I pull this off

    I do not mind if this column an existing records does not change, or is even NULL - I just need future inserts to maintain the default value of this column.

    2 - I'm pretty sure this is accurate, but this articles' statement on insert statements kind of confused me ( Assuming the table my_tbl has 3 columns, column_1, column2, and column3 which has a default value of 'N/A'.
    I do an insert into my_tbl (column_1, column2) values ('a','b');

    In this case, column 3 on this record would have a value of 'N/A' - is that correct?

    Thank you

  2. #2
    Join Date
    Dec 2003
    Problem solved...No need for a default value when i can just use NVL.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts