MySQL: Combine Two UPDATE Queries for Efficient Comment Count Reduction
UPDATE BriefingProfile SET commentposted = commentposted - 1, contentcommentgeted = contentcommentgeted - 1 WHERE (commentposted > 0 AND briefinguser = OLD.commentator) OR (contentcommentgeted > 0 AND briefinguser = OLD.publisher);
原文地址: https://www.cveoy.top/t/topic/mMek 著作权归作者所有。请勿转载和采集!