how many joins can a sql query have
How many INNER JOIN s can a query tolerate
SELECT table0.person_name, table5.animal_name
FROM table1
JOIN table0 ON table1.person_id = table0.person_id
JOIN table5 ON table1.anim开发者_如何学JAVAal_id = table5.animal_id
WHERE table1.aa = input1
AND table1.bb = input2
AND table1.cc = input3
AND table1.dd = input4
This msdn link provides all of the relevant statistics. Versions of SQL Server after 2005 don't have a hard limit on number of joins, but instead it is limited by "available resources". For any sane query, you're not going to run out.
精彩评论