문제

Do you know if there is a limit of the the numbers of elements we can write in a IN expression ? (with SQL Server)

ex :

SELECT *
FROM table
Where toto IN (1,2,3...., Max ?) 

thank you ;)

도움이 되었습니까?

해결책

The Oracle SQL DB allows for a maximum of 1000 elements for in statements. However, you are not limited to 1000 elements if you use a select statement rather than specifying each element.

SELECT *
FROM table
Where toto IN (SELECT toto FROM other) 

I've used this when I have queries run for long periods of time that my otherwise timeout. This thread may also be helpful for you https://community.oracle.com/thread/235143

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top