W3Cschool
恭喜您成為首批注冊用戶
獲得88經驗值獎勵
1.基礎語法
UPDATE table_name SET column1 = value1, column2 = value2...., columnN = valueN WHERE [condition];
2.多表聯(lián)合更新記錄
upate "A" set "A字段" = B."字段" from "B" where "A字段" = B."字段" 或
upate "A" set "A字段" = B."字段" from "B" where A."字段" = B."字段" 例1:
UPDATE "ZP01_copy" SET "建制村人口" = B."總人口數" , "自然村數量" = B."自然村數" FROM "WPS表格" B WHERE left("鄉(xiāng)鎮(zhèn)名稱",1)= left(B."鄉(xiāng)(鎮(zhèn))",1) AND left("建制村名稱",1)= left(B."村",1) AND "建制村人口" = '' AND "建制村名稱" != '大村委會' AND "建制村名稱" != '小村委會'
例2:
UPDATE "ZP1" A SET "通達路線編碼" = B."通達路線編碼" FROM "Z02" B WHERE A."鄉(xiāng)鎮(zhèn)名稱" = B."鄉(xiāng)鎮(zhèn)名稱" AND A."建制村名稱"= B."建制村名稱" AND A."通達路線編碼" = ''
Copyright©2021 w3cschool編程獅|閩ICP備15016281號-3|閩公網安備35020302033924號
違法和不良信息舉報電話:173-0602-2364|舉報郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號
聯(lián)系方式:
更多建議: