| List: | General Discussion | « Previous MessageNext Message » | |
| From: | mysql | Date: | October 26 2007 4:00pm |
| Subject: | Re: Comparing keys in two tables | ||
| View as plain text | |||
Aaron Fischer wrote: > Greetings! > > I have a problem that it seems would best be solved using subqueries. > However, I am working on a server that is running MySQL 3.23.58, so > subqueries are not available to me. > > What I am trying to do: > I have two tables, each containing approximately 37,000 records. I > want to compare the index field in Table A to the index field in Table > B. I would like to see all records where the index in Table A does not > exist in Table B. > You want to select from A, not from B, yes? SELECT a.* FROM foo AS a LEFT OUTER JOIN bar AS b ON a.index_field = b.index_field WHERE b.index_field IS NULL; brian
| Thread | ||
|---|---|---|
| • Comparing keys in two tables | Aaron Fischer | 26 Oct |
| • Re: Comparing keys in two tables | Baron Schwartz | 26 Oct |
| • Re: Comparing keys in two tables | Peter Brawley | 26 Oct |
| • Re: Comparing keys in two tables | Aaron Fischer | 26 Oct |
| • Re: Comparing keys in two tables | Baron Schwartz | 26 Oct |
| • Re: Comparing keys in two tables | Rob Wultsch | 26 Oct |
| • Re: Comparing keys in two tables | Baron Schwartz | 26 Oct |
| • Re: Comparing keys in two tables | Peter Brawley | 26 Oct |
| • Re: Comparing keys in two tables | mysql | 26 Oct |
