default values for columns
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: default values for columns

  1. #1
    Join Date
    Feb 2001
    Posts
    34
    Hi,
    Is there any data dictionary view,from where I can get default_value for a specific column ?If I've a table with some integer,char,decimal fields and I want to insert default values into those columns.I'm not using default cluase when I create the table.Instead I want to use the default values of those column datatypes(0 for intger,etc).Is that possible from data dictionary ?

    Thanks,
    Kavitha.

  2. #2
    Join Date
    Sep 2000
    Posts
    47
    Hi Kavitha,

    You can have a pre-insert trigger on the table that "dumps" desired values in the column whenever it has NULL values being inserted. Other than this you can define "Default Value" clause at the time of table creation. Cannot find anything else.
    You can ALTER the table to add the Defalut Value clause.

    Check for the required information in : USER_TAB_COLUMNS. The column DATA_DEFAULT stores the default value defined for that column.

    Hope this helps.


Posting Permissions

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



Click Here to Expand Forum to Full Width