SQL Server: What's the limit on number of UNIONs?

前端 未结 3 488
生来不讨喜
生来不讨喜 2021-01-05 01:48

I was wondering if there\'s a limit on a number of UNION\'ed SELECT statements I can send to an SQL Server? I may have up to 36 done in one SQL statement, so it becomes quit

3条回答
  •  时光取名叫无心
    2021-01-05 02:16

    According to this post somwhere between 8000 and 16000, for his particular query. Is probably mostly goverened by the resources available to your SQL Server.

    It might be worth asking another question about the particular case you have for an alternative method that doesn't need so many unions.

提交回复
热议问题