NULL problems caused by new fields in the table

there is a new requirement that needs to add a field X to the table TABlE_A. Suppose X has values of 0 and 1, but for historical data, the value of this field is NULL,. What do you prefer to do at this time?

  1. data revision. Brush over the historical data
  2. add the judgment that the X field is NULL in the code
Mar.06,2021
Menu