In mysql or postgres, is there a limit to the size of an IN (1,2,n) statement?

Posted by Kyle on Stack Overflow See other posts from Stack Overflow or by Kyle
Published on 2010-03-11T15:41:38Z Indexed on 2010/03/11 17:44 UTC
Read the original article Hit count: 176

Filed under:
|
|
|
|

I've got quite a few SQL statements like such:

SELECT foo FROM things WHERE user_id IN (1,2,3..n)

Is there a known limit to the number of elements that will safely fit in an IN clause like that?

© Stack Overflow or respective owner

Related posts about sql

Related posts about limit