codecamp

update更新记录

1.基础语法

UPDATE table_name SET column1 = value1, column2 = value2...., columnN = valueN WHERE [condition];

2.多表联合更新记录

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("乡镇名称",1)= left(B."乡(镇)",1) AND left("建制村名称",1)= left(B."村",1) AND "建制村人口" = '' AND "建制村名称" != '大村委会' AND "建制村名称" != '小村委会'

例2:

UPDATE "ZP1" A SET "通达路线编码" = B."通达路线编码" FROM "Z02" B WHERE A."乡镇名称" = B."乡镇名称" AND A."建制村名称"= B."建制村名称" AND A."通达路线编码" = ''

CONCAT+ST_X+ST_Y生成X,Y坐标
查询表格字段,字段类型,并过滤处理
温馨提示
下载编程狮App,免费阅读超1000+编程语言教程
取消
确定
目录

Oracle数据库.

MySQL数据库

Access数据库

关闭

MIP.setData({ 'pageTheme' : getCookie('pageTheme') || {'day':true, 'night':false}, 'pageFontSize' : getCookie('pageFontSize') || 20 }); MIP.watch('pageTheme', function(newValue){ setCookie('pageTheme', JSON.stringify(newValue)) }); MIP.watch('pageFontSize', function(newValue){ setCookie('pageFontSize', newValue) }); function setCookie(name, value){ var days = 1; var exp = new Date(); exp.setTime(exp.getTime() + days*24*60*60*1000); document.cookie = name + '=' + value + ';expires=' + exp.toUTCString(); } function getCookie(name){ var reg = new RegExp('(^| )' + name + '=([^;]*)(;|$)'); return document.cookie.match(reg) ? JSON.parse(document.cookie.match(reg)[2]) : null; }