Friday, February 24, 2012

Is there any limit to Left Join ?

I am going to create a query with more than 1 LEFT JOIN.
I would like to know is there any limit (Like only 1 can
be used) in SQL Server 2000 ?
ThanksNah - no practical limit (the maximum tables per SELECT statement in SQL
Server 8.0 is 256). If you look at the grammar for the FROM clause in
BOL you'll see it's a recursive grammar.
If you were to join a couple hundred tables in your FROM clause you'd
probably hit some limits when you started running out of memory in the
procedure cache for your query plan and the CPU ground to a halt trying
to process the mother of all queries but if you stay under 200 joins in
a single query you should be OK. ;-)
Happy joining!
*mike hodgson* |/ database administrator/ | mallesons stephen jaques
*T* +61 (2) 9296 3668 |* F* +61 (2) 9296 3885 |* M* +61 (408) 675 907
*E* mailto:mike.hodgson@.mallesons.nospam.com |* W* http://www.mallesons.com
Peter wrote:

>I am going to create a query with more than 1 LEFT JOIN.
>I would like to know is there any limit (Like only 1 can
>be used) in SQL Server 2000 ?
>Thanks
>|||"Mike Hodgson" <mike.hodgson@.mallesons.nospam.com> wrote in message
news:OlTsSgJGFHA.3908@.TK2MSFTNGP12.phx.gbl...

> but if you stay under 200 joins in a single query you should be OK. ;-)
LOL! I love a well-designed database... :-)

No comments:

Post a Comment