我正在尝试使用select查询从一个表更新列。
它会将整个type_
列作为religious
(文本字段)运行并更新。
我试图仅更新宗教几何与宗地几何相交的行。
update wash_parcels_final
set type_ = t.religious
from (select wash_worship.religious
from wash_parcels_final
join wash_worship
on st_intersects(wash_worship.geom, wash_parcels_final.geom)) t
答案 0 :(得分:4)
我认为这就是你想要的:
update wash_parcels_final
set type_ = ww.religious
from wash_worship ww
where st_intersects(ww.geom, wash_parcels_final.geom);