SQL IN clause generator
Paste a column of values from Excel or a file and get a ready IN (...) list for your WHERE clause.
Private: everything happens in your browser. Nothing you type or choose is uploaded.
1001 1002 1003 1002 O'Brien
How to use it
- Paste your values.
- Choose how they are split and quoted.
- Copy the IN clause into your query.
Questions and answers
Are quotes inside values escaped?
Yes. A single quote is doubled, so O'Brien becomes 'O''Brien', which is standard SQL.
When are values left unquoted?
In Auto mode, if every value is a number. Choose Always single to quote numbers too.
Is there a limit on IN lists?
Oracle allows 1,000 values per IN list; SQL Server and PostgreSQL allow far more, but very long lists are slow. For thousands of values, consider a temporary table.