记录一次mysql json的更新语句

UPDATE salary_rule AS sr
    JOIN salary_template AS st ON sr.template_id = st.id
    SET
        sr.rule_ratio = JSON_ARRAY(JSON_OBJECT('payDate', st.pay_date, 'ratio', 1))
WHERE st.bu_id = 99 and sr.select_state = 1;

 

posted @ 2023-09-27 15:15  二次元的程序猿  阅读(29)  评论(0编辑  收藏  举报