|
-
To Update null columns- which is the best way
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,
-
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']
-
For 200M rows, and one time update, I would go for CTAS.
Tamil
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|