He does have a join. He has an *implied* INNER JOIN
FROM pages, pdflog
What he is really missing is the WHERE clause that matches something from
pages with something from pdflog.... Without it he is requesting a
Cartesian product of his tables (every combination of each row from both
I prefer to define my JOINS *explicitly*. It makes it harder to
accidentally define Cartesian products):
SELECT DISTINCT company
INNER JOIN pdflog
ON ...some condition goes here ....
ORDER BY company
Unimin Corporation - Spruce Pine
"Martijn Tonies" <m.tonies@stripped> wrote on 08/09/2004 11:38:31 AM:
> > God, I feel real stupid this morning and know I should know this. I
> > 2 tables in the same database and I'm trying to select distinct data
> > a row with the same name in each table.
> > SELECT DISTINCT company FROM pages, pdflog ORDER BY company ASC
> > I'm missing something I'm sure because it doesn't work.
> Feel stupid again ;-)
> Where's your JOIN?
> With regards,
> Martijn Tonies
> Database Workbench - developer tool for InterBase, Firebird, MySQL & MS
> Upscene Productions
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe: http://lists.mysql.com/mysql?unsub=1