Not Null Case
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: Not Null Case

  1. #1
    Join Date
    Feb 2009
    Posts
    49

    Not Null Case

    Hi All,

    I have a smaill query

    I have a table with 100 rows.Now I want to add one column with not null constraint. Will oracle permits to add....? if yes then what will be the values for the new column for already exixting 100 rows...?

    If no how can I resolve this case of adding new column....?

    Thanks in Advance...

  2. #2
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,333
    what happened when you tried this on a test database?

  3. #3
    Join Date
    Feb 2009
    Posts
    49
    I dont have any test db to try this.......Please help...

  4. #4
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,554
    make a copy of your table in a personal schema -call it test and try there.
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

  5. #5
    Join Date
    Nov 2000
    Location
    Pittsburgh, PA
    Posts
    3,999
    You either need to specify a default value and not null at the same time, or you need to add the column nullable, put a value in every row and then make it not null. If you add a column and have no default value then the default value will be null.
    this space intentionally left blank

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