View Single Post

   
  #10 (permalink)  
Old 02-28-2008, 11:32 AM
Paul Lautman
 
Posts: n/a
Default Re: Complex JOIN vs multiple selects

Michael Austin wrote:
> Captain Paralytic wrote:
>> On 18 Jan, 12:34, Willem Bogaerts
>> If book.id = 5 applied to more than one book then,
>> SELECT content, @author_id:=authorId FROM book WHERE id=5;
>> whould give you the content for every book where the id=5
>>
>> Can't see the difference myself.

>
> SELECT book.content, author.name FROM book NATURAL JOIN author WHERE
> book.id=5;
>
> This is valid syntax, however, if you are not also restricting your
> query to include a single author, it shows a very poor working
> knowledge of your data does it not?


What the h*ll are you talking about? What data of mine do I not know about?
I didn't start this thread. I never even posted a query on it???



Reply With Quote