我可能需要你的帮助......我有以下 MySQL 查询:
SELECT * FROM dbName1.Prospects A
LEFT JOIN dbName2.inbox B ON
substring(A.ProspectCellPhone, 2) = substring(B.SenderNumber, 4) OR
substring(A.ProspectCellPhone, 3) = substring(B.SenderNumber, 4) OR
substring(A.ProspectCellPhone, 4) = substring(B.SenderNumber, 4)
LEFT JOIN dbName1.User C ON A.Username = C.Username
WHERE B.TextDecoded IS NOT NULL
AND substring(B.SenderNumber,1,1) = '+'
AND B.NotificationFlag = '0'
返回 125 结果...但是当我尝试使用相同的查询进行更新时,它只返回 45 个更新的结果...更新查询是:
UPDATE dbName1.Prospects A
LEFT JOIN dbName2 B ON
substring(A.ProspectCellPhone, 2) = substring(B.SenderNumber, 4) OR
substring(A.ProspectCellPhone, 3) = substring(B.SenderNumber, 4) OR
substring(A.ProspectCellPhone, 4) = substring(B.SenderNumber, 4)
LEFT JOIN dbName1.User C ON A.Username = C.Username
SET B.NotificationFlag = '1'
WHERE B.TextDecoded IS NOT NULL
AND substring(B.SenderNumber,1,1) = '+'
AND B.NotificationFlag = '0'
我在 UPDATE 查询上做错了吗?
非常感谢您的帮助...