"not exists" question

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
tennis_blues
Forum Newbie
Posts: 21
Joined: Sun Oct 20, 2002 8:30 am

"not exists" question

Post by tennis_blues »

this may be an easy question....and i am just too tired too think?? but can you please help?

i would like to run a query that gets all the days where there is no meeting scheduled

so my tables are:
Table 1 (Day) - DayID (filled with Tuesdays for the next year)
Table 2 (Meeting) - MeetingID, DayID, ContactName, Time

so what is the query that gets all the DayID where there isnt a Meeting.DayID = Day.DayID

please help!

thanks!
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

Check out JOINS (there's an example in there of what you want to do):
http://www.mysql.com/doc/en/JOIN.html

Mac
Post Reply