我有相同查询的两种变体:
SELECT * FROM jos_mls AS mls
INNER JOIN jos_activeagents AS active ON mls.MSTLISTBRD = active.AGENTUID
INNER JOIN jos_agents AS agents ON active.AGENTUID = agents.AGTBRDIDMM
INNER JOIN jos_agencies AS firm on agents.AGTFRMID = firm.OFFFRMID
AND mls.MSTRECAPDT >= ADDTIME(CURRENT_TIMESTAMP(), '04:29:00.000000');
和...
SELECT * FROM jos_mls AS mls
INNER JOIN jos_activeagents AS active ON mls.MSTLISTBRD = active.AGENTUID
INNER JOIN jos_agents AS agents ON active.AGENTUID = agents.AGTBRDIDMM
INNER JOIN jos_agencies AS firm on agents.AGTFRMID = firm.OFFFRMID
AND mls.MSTMLSNO = '4115762';
第一个工作正常,没有问题。第二个是根据唯一键查找条目。但是,它给出了一个空集。我可以验证密钥是否存在,当我运行第一个查询时,我知道该列已包含在集合中。
我试过用引号和不带引号来拉它,但没有运气。有什么建议么?