I have an update query in postgres as such:
update table1 e
set (col1,col2) = 
(select col1,col2 from table2 se
where  e.id = se.id and se.col2 is not null);
However this updates all rows even the ones that are nulls for  se.col2. The rows are updated as nulls. I want to just update where se.col2 is not null . Not all rows.
 
     
    