Not Null Case
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...
what happened when you tried this on a test database?
I dont have any test db to try this.......Please help...
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.
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
Click Here to Expand Forum to Full Width