开发者

Is there a limit to how long a SQL query can be in SQL Server? [duplicate]

开发者 https://www.devze.com 2023-04-03 16:39 出处:网络
This question already has answers here: Closed 11 years ago. Possible Duplicate: Maximum size for a SQL Server Query? IN clause? Is there a Better Approach
This question already has answers here: Closed 11 years ago.

Possible Duplicate:

Maximum size for a SQL Server Query? IN clause? Is there a Better Approach

I Googled for a while and can't find whether there's some hard limit on how huge query strings can be in SQL Server. I mean what if I 开发者_如何学Cbuild a 100 million character query - will it run or will the server just drop it as too long?

Is there a limit to how long SQL query can be (in terms of characters or tokens or whatever like that) in SQL Server?


I never encountered a problem of SQL query being too long in terms of number of characters, but there is a maximum number of tables a query can reference (256) and I hit this limitation a few times.

Have you ever encountered a query that SQL Server could not execute because it referenced too many tables?

UPDATE
In recent versions of SQL Server, the number of tables per SELECT statement is limited only by available resources.

0

精彩评论

暂无评论...
验证码 换一张
取 消