UPDATE git_version SET update_time = '2023-07-24 13:10:54', status = CASE WHEN status = 0 THEN 0 ELSE CASE WHEN id = 114 THEN 1 ELSE 0 END END WHERE status <> 2 AND (status = 1 OR status = 0); This SQL statement updates the 'git_version' table, setting the 'update_time' to '2023-07-24 13:10:54' and changing the 'status' based on the current status and ID. Specifically, it sets the status to 1 for the record with ID 114 if its current status is not 0, and resets the status to 0 for records with a current status of 1. It leaves status 0 records unchanged.


原文地址: https://www.cveoy.top/t/topic/pZuQ 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录