how many joins can a sql query have

2019-09-13 05:34发布

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.animal_id = table5.animal_id
WHERE table1.aa = input1 
  AND table1.bb = input2 
  AND table1.cc = input3 
  AND table1.dd = input4

1条回答
smile是对你的礼貌
2楼-- · 2019-09-13 05:58

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.

查看更多
登录 后发表回答