Subject Re: [firebird-support] simple sql join ?
Author Martijn Tonies
> Yes, and reads from tables : count(tb1) * count(tb2) . no good.

Well, given that you want the FULL results from BOTH tables,
what do you expect?

What is it that you're trying to do?

From the sample result, I'd say you want all rows in T1 and
all rows in T2 and have NULLs for places where there's no
existing match.

Martijn Tonies
Database Workbench - development tool for Firebird and more!
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com

> Nick wrote:
>
> >select * from table1 full join table2 on id1 = id2
> >
> >Hi,
> >
> >I need simply to join 2 tables with join, where result is :
> > TB1 (ID1) - ID - index
> > 1
> > 2
> > 3
> > TB2(ID2) - ID - index
> > 4
> > 5
> > 6
> >select .... :
> > TB1.ID1 TB2.ID2
> > 1 NULL
> > 2 NULL
> > 3 NULL
> > NULL 4
> > NULL 5
> > NULL 6
> >Any way to do it ?
> >Conditions :
> >NO SP, NO Union. (in real conditions and union and Sp is to slow
> >because of size of tables (>2.5mill records.))