Subject | Re: [firebird-support] Possible Firebird BUG? |
---|---|
Author | Arno Brinkman |
Post date | 2004-02-10T14:45:50Z |
Hi,
want to add a field to the select-list you must also add it to the group by
clause. Without diving into it deeply i think the outer joins would be more
expensive in this situation.
SELECT
*
FROM
Table1 t1
JOIN Table2 t2 ON (t2.ID = t1.ID)
instead of
SELECT
*
FROM
Table1 t1,
Table2 t2
WHERE
t2.ID = t1.ID
Regards,
Arno Brinkman
ABVisie
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Firebird open source database (based on IB-OE) with many SQL-99 features :
http://www.firebirdsql.org
http://www.firebirdsql.info
http://www.fingerbird.de/
http://www.comunidade-firebird.org/
Support list for Interbase and Firebird users :
firebird-support@yahoogroups.com
Nederlandse firebird nieuwsgroep :
news://80.126.130.81
> >Yes, those are correctly returning the same values. You're INNER JOINingthe
> >tables.Yes, because Count(Field) would only count not null fields, but when you
> >
> >Using sub-selects is probably the thing you want
> >
> Wouldn't a left outer join do the same thing? If so, what's the
> advantage of a subselect?
want to add a field to the select-list you must also add it to the group by
clause. Without diving into it deeply i think the outer joins would be more
expensive in this situation.
> >(i prefer sql-92 syntaxThe SQL-92 syntax supports JOINS thus :
> >instead of sql-89):
> >
> What do you mean by this?
SELECT
*
FROM
Table1 t1
JOIN Table2 t2 ON (t2.ID = t1.ID)
instead of
SELECT
*
FROM
Table1 t1,
Table2 t2
WHERE
t2.ID = t1.ID
Regards,
Arno Brinkman
ABVisie
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Firebird open source database (based on IB-OE) with many SQL-99 features :
http://www.firebirdsql.org
http://www.firebirdsql.info
http://www.fingerbird.de/
http://www.comunidade-firebird.org/
Support list for Interbase and Firebird users :
firebird-support@yahoogroups.com
Nederlandse firebird nieuwsgroep :
news://80.126.130.81