用下边语句企图将innter_table中col字段一一updata给outer_table,UPDATE outter_table SET col = (SELECT col FROM inner_table WHERE id = outter_table.id);
但出现了ERROR 1048 (23000): Column 'col' cannot be null 的错误,
大概是因为outter_table中有的id,inner_table中不存在造成的。如果是这样的话,该如何修正这个update语句从而规避这个问题?
如果不是我猜测的原因,那会是什么造成的?该如何规避?