update
  tbl_test
set
  test_json = JSON_REPLACE(
    test_json,
    '$."jsonFieldName"',
    (
      CAST(test_json -> '$."jsonFieldName"' AS SIGNED INTEGER) - 70 * 365 -19
    ) * 86400 - 3600 * 8
  ) 
where
  test_json
-> '$."jsonFieldName"' = "55555" limit 1

版本: mysql8.0

posted on 2023-04-27 16:28  黑熊一只  阅读(250)  评论(0编辑  收藏  举报