| List: | General Discussion | « Previous MessageNext Message » | |
| From: | Willem Bison | Date: | March 11 1999 2:53pm |
| Subject: | SQL join question | ||
| View as plain text | |||
I need to list items in a table that do not have a corresponding item in a related table. The table 'forum' contains the complete list, the table 'msg' contains 'orphaned' items. The tables are linked with field 'id'. I looked in the archive and tried this based on a posting I found: select forum.id from forum left join msg using (id) where msg.id=NULL limit 5; This query gives an empty result set, while a record with id=1 exists in 'forum' but not in 'msg' (so '1' is an item in the desired result set). What is the correct SQL statement ?
| Thread | ||
|---|---|---|
| • SQL join question | Willem Bison | 11 Mar |
| • Re: SQL join question | Christian Mack | 11 Mar |
| • Re: MySQL 3.23 alpha released (problems/fixes) | Paul DuBois | 5 Jul |
| • MySQL 3.23 & autoincrement | Barry | 5 Jul |
| • Re: MySQL 3.23 & autoincrement | Paul DuBois | 5 Jul |
| • Re: MySQL 3.23 & autoincrement | Martin Ramsch | 5 Jul |
| • Re: MySQL 3.23 & autoincrement | Paul DuBois | 5 Jul |
| • Re: MySQL 3.23 & autoincrement | Michael Widenius | 7 Jul |
| • Re: MySQL 3.23 & autoincrement | Dick Griffin | 5 Jul |
| • Re: MySQL 3.23 & autoincrement | Michael Widenius | 7 Jul |
| • MySQL 3.23 & autoincrement | Michael Widenius | 7 Jul |
