update postgresql using join code example Example: update with inner join postgres update xtable x set col1 = y.col1 from ytable y where y.x_id = x.id;