Click to See Complete Forum and Search --> : To Update null columns- which is the best way


peacelover1015
04-04-2006, 06:44 PM
I just started a new job. The table has null values in some columns. It has about 200 million rows. The developers were doing IS NULL in the table. Normally if it is a 1 million row table, I would use bulk to update the null columns and put a default where there can be null values in the table ALTER. I have never worked with 200 million. What do you think is the best approach to update these ciolumns that have nulls. I know I can use before update trigger also. Pl. do let me know the best way to clean this mess up.

Thank you,

gamyers
04-05-2006, 01:12 AM
Firstly, identify the problem. NULL values are not a problem in themselves.
Why do you think they need to be updated.

If just want to index nulls, then you can use a function based index [eg DECODE(col,NULL,'NULL') and query where DECODE(col,NULL,'NULL') = 'NULL']

tamilselvan
04-05-2006, 12:17 PM
For 200M rows, and one time update, I would go for CTAS.

Tamil