所以我制作了这段代码:
SELECT
day.weekday
FROM
day,
event,
event_date
WHERE
EXISTS( SELECT
day.weekday
FROM
day)
AND event.event_id = event_date.event_id
AND event.day= day.day
GROUP BY day.weekday
它正在运作,但还有其他方法可以使用EXSISTS吗?
答案 0 :(得分:3)
试试这个
SELECT
day.weekday
FROM
day
JOIN event ON event.day= day.day
JOIN event_date ON event.event_id = event_date.event_id
GROUP BY
day.weekday