我現在有表 well_info 跟 well_test
要更新資料但是他一直抱錯 找不到原因
語法如下
update well_info as we
set we.site_name = up.site_name
from well_test as up
where we.site_no = up.site_no
錯誤如下
ERROR: column "we" of relation "well_info" does not exist
LINE 2: set we.site_name = up.site_name
^
SQL 状态: 42703
字符: 28
應該是這樣的吧~
update well_info
set site_name = well_test.site_name
from well_test
where well_info.site_no = well_test.site_no