当我输入以下内容时:
SELECT *
FROM `events`
WHERE `tournament` = 'Super 15'
AND `round` = '13'
我回来了:
我插入的时候:
SELECT events.event_id,events.tournament, events.team1, events.team2,events.round,
events.event_date, events.venue, picks.pick
FROM events
INNER JOIN picks ON events.event_id = picks.event_id
where
events.tournament="Super 15" AND events.round="13"
我GET:
表1:
表2:
我知道为什么我会为具有类似WHERE
子句的两个查询获得不同的结果
答案 0 :(得分:1)
使用以下查询获得相同的结果: - SELECT events.event_id,events.tournament,events.team1,events.team2,events.round, events.event_date,events.venue,picks.pick 来自事件 LEFT JOIN选择ON events.event_id = picks.event_id 哪里 events.tournament =" Super 15" AND events.round =" 13"