title: Is there a limit to how long a SQL query can be in SQL Server?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/1869753/maximum-size-for-a-sql-server-query-in-clause-is-there-a-better-approach">Maximum size for a SQL Server Query? IN clause? Is there a Better Approach</a>  </p>
  </blockquote>
  
  
  
  <p>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 build a 100 million character query - will it run or will the server just drop it as too long?</p>
  
  <p>Is there a limit to how long SQL query can be (in terms of characters or tokens or whatever like that) in SQL Server?</p>