MySQL语句合并 UPDATE CommunicationContact SET messages = messages + 1 WHERE username = NEWreceiver AND contact = NEWsender; UPDATE CommunicationProfile SET contactmessages = contactmessages + 1 WHERE us
UPDATE CommunicationContact cc
JOIN CommunicationProfile cp ON cc.username = cp.username
SET cc.messages = cc.messages + 1, cp.contactmessages = cp.contactmessages + 1
WHERE cc.contact = NEW.sender AND cc.username = NEW.receiver;
原文地址: https://www.cveoy.top/t/topic/bhcg 著作权归作者所有。请勿转载和采集!