From a spreadsheet column to WHERE customer_id IN (...), without the hand editing
The job comes up all the time. Someone sends a spreadsheet of 300 customer ids and asks what happened to those accounts. The query is simple, WHERE customer_id IN (...), but the list has to be typed by hand: a comma after every value, quotes around every text value, and no comma after the last one. Doing that for 300 rows in an editor is slow, and one missed quote breaks the query.
Paste the column instead. Three rows, 1042, 1043 and 1187, become IN (1042, 1043, 1187). All three are plain numbers, so they stay bare, which is right for a numeric column. Now paste O'Brien, Smith and 007. O'Brien is text, so every value is quoted, and its apostrophe is doubled, the SQL way to write a quote inside a string: IN ('O''Brien', 'Smith', '007'). The 007 is quoted too. A leading zero means it is a code, not a quantity, and writing it as the number 7 would match the wrong row.
Duplicates are removed by default, because a spreadsheet export often repeats an id, and the note under the result says how many went. Type a column name, such as customer_id, and it is written in: customer_id IN (...). That matters for the Oracle option. Oracle stops with error ORA-01795 when one IN list has more than 1,000 values, so with the option on, a list of 2,500 values becomes three lists of at most 1,000, joined with OR and wrapped in brackets: (customer_id IN (...) OR customer_id IN (...) OR customer_id IN (...)). The brackets keep the OR from mixing with the rest of your WHERE clause.
Quoting is the choice to think about. By default numbers are bare only when every value is a plain number. Turn on Quote every value when the column is a text type, such as a VARCHAR holding order numbers. Comparing a text column with a bare number can force the database to convert the column on every row, which stops it using an index and can fail outright on a row that is not a number. A quoted list compares text with text.
This is a tool for queries you write and run yourself. Doubling quotes makes each value a correct string literal, but application code should still pass values as query parameters, which the database driver handles safely. Very long lists have costs too. Above a few thousand values, loading them into a temporary table and joining it is usually faster than one giant IN, and some databases have limits on the total size of a statement. The tool also does not know your column types, so it cannot tell that a numeric-looking value belongs in a text column. That choice is yours.