Maximum number of joins allowed in single SQL statement

I have a gigantic SQL statement that has 10 left outer joins and 2 inner joins. what is the maximum number of joins SQL will allow...i tried adding another left join but got this error message:
The correlation name 'Foreign Key' is specified multiple times in a FROM clause.
felkamauAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Brendt HessConnect With a Mentor Senior DBACommented:
You can have up to 256 table references (and thus, that many joins) in one SELECT statement.

However, the error you reference has nothing to do with this limit.  Instead, it implies that you have named two separate table instances with the same alias - 'Foreign Key'.  Check your table aliases.
0
 
trainsdseCommented:
Maybe just paste in the from clause so we can see.
0
 
trainsdseCommented:
I agree with bhess1, sure would help if we had the from clause :)
0
All Courses

From novice to tech pro — start learning today.