|
Posted by Jerry Stuckle on 12/03/07 12:39
Oliver Grätz wrote:
> Jerry Stuckle schrieb:
>> Oliver Grätz wrote:
>>> If your query is "too complicated", you can always
>>> work with subqueries:
>>>
>>> SELECT wanted_field_1,wanted_field_2
>>> FROM (SELECT with your complicated query)
>>> AS subtable [...]
>> Subqueries are almost never correct. Joins are much better.
>
> 1. This was an explicit response to "my query is too complicated" and
> the whole complicated query should be encapsulated as a subquery.
>
I understand. And I still stand by my statement.
> 2. You are not stating your argument with any explanation. It reads like
> "Blue is lame, red is much better."
>
Because SQL is not PHP, and this is a PHP newsgroup. But you can get a
lot of help and explanation on how to structure your SQL statements in
the appropriate newsgroup - such as comp.databases.mysql. That's where
the MySQL experts hang out.
> 3. Subqueries are aqn important part of SQL nad the fact that they can
> often be replaced by joins does not render them incorrect. There is
> always more than one way to do it.
>
Just because they are legal doesn't mean they are correct. There are
many reasons why JOINs are better.
> 4. Please stop full-quoting when you are in fact just anserinfg to one
> sentence.
>
> OLLi
>
Please learn to post SQL questions in a SQL newsgroup. This is a PHP
newsgroup, in case you haven't noticed the name.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Navigation:
[Reply to this message]
|