软件下载吧文章资讯

分类分类

PostgreSQL COALESCE使用方法代码解析

2024-03-08 08:50作者:下载吧

有这种要求,更新自己本身的字段的某个值进行加或者减

常规方法:

UPDATE
tbl_kintai_print_his
SET
print_time = now(),
print_emp_cd = ‘000000’,
times = (select times from tbl_kintai_print_his where kokyaku_cd = ‘000002’ AND
sagyo_ymd = ‘2015-01-30’ )
+ 1,
pattern = ‘055’ ,
ko_item_1 = ‘no.0’ ,
ko_item_2 = ‘no.2’ ,
ko_item_3 = ‘no.3’ ,
ko_item_4 = ‘no.4’ ,
ko_item_5 = ‘no.5’
WHERE
kokyaku_cd = ‘000002’ AND
sagyo_ymd = ‘2015-01-30’

展开全部

相关文章

说两句网友评论
    我要跟贴
    取消