Sergey Spiridonov wrote:
Sergey Spiridonov <[EMAIL PROTECTED]> writes:
Yes, but for me it makes no sense. I would understand, if it will be
SELECT messageblk FROM dbmail_messages LEFT JOIN dbmail_messageblks
USING (physmessage_id)
WHERE dbmail_messages.message_idnr = '%llu'
so that we will get one line for the message which does not have blocks
in message blocks.
But even this makes no sense, since there should be no messages which does not
have according entry(ies) in the dbmail_messageblks (as far as I understand).
Well, afaik the query retrieves all messageblks associated with the
message_idnr. I know it does so for mysql, and I havent seen any complaints from
the postgres users otherwise.
The mysql docs clearly state that the left join query is equivalent to a regular
join in this usecase. But then, mayby monty doesn't really know sql :-), or I
wasn't paying attention when I read that part.
mysql> SELECT * FROM table1,table2 WHERE table1.id=table2.id;
mysql> SELECT * FROM table1 LEFT JOIN table2 ON table1.id=table2.id;
mysql> SELECT * FROM table1 LEFT JOIN table2 USING (id);
These are all semantically identical in mysql.
--
________________________________________________________________
Paul Stevens [EMAIL PROTECTED]
NET FACILITIES GROUP GPG/PGP: 1024D/11F8CD31
The Netherlands_______________________________________www.nfg.nl