時間:2024-03-08 08:50作者:下載吧人氣:26
有這種要求,更新自己本身的字段的某個值進行加或者減
常規方法:
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’
網友評論