postgresql 两张表关联更新

set 后面字段不用带表别名 否则会报错

update hqweb.t_car  t
set county_code = map.county_code

from  hqmap.t_car_pos map
where t.terminal_id  =   map.terminal_id

猜你喜欢

转载自blog.csdn.net/cainiaochen3/article/details/103525296