我有兩張桌子可以訪問
table1 (name,nat) 16000 records
table2 (v_name,id) 189000 records
我想用 table2 中的 id 更新 table1 中的 nat。嘗試了以下
UPDATE table1 SET nat = (SELECT table2.ID FROM table2 INNER JOIN table1 ON table2.V_name = table1.Name);
得到以下
錯誤:操作必須使用可更新的查詢
uj5u.com熱心網友回復:
您可以嘗試UPDATE .... JOIN在訪問中使用
UPDATE table1 t1
INNER JOIN table2 t2
ON t2.V_name = t1.Name
SET t1.nat = t2.ID
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/429062.html
上一篇:如何從ExcelVBA運行查詢
