SQL LIST BUILDER · LOCAL WORKBENCH

SQL IN Clause Builder

Turn a pasted value column into an ad hoc SQL IN or NOT IN condition, with apostrophe escaping and NULL logic handled.

SQL LIST BUILDER · LOCAL WORKBENCH · BROWSER WORKSPACE

Paste the column. Review NULLs and escaping before you run it.

Turn a pasted value column into an ad hoc SQL IN or NOT IN condition, with apostrophe escaping and NULL logic handled.

01 · PASTED COLUMN6 VALUES
Local processing

Pasted values remain in this browser. Trimmed duplicate values are removed when the option is on.

02 · QUERY CONDITIONLIVE PREVIEW
VALUES4
DUPLICATES REMOVED1
APOSTROPHES ESCAPED2
NULLS SEPARATED1
NULL logic handledNULL is handled with IS NULL because NULL inside an IN list never matches.
PASTE INTO A QUERY EDITORSQL CONDITION
surname IN ('O''Brien', 'Smith', 'Jones', 'O''Neill')
  OR surname IS NULL
Why NULL is separate

SQL uses three-valued logic. A NULL inside NOT IN can make the whole predicate unknown and silently exclude every row. This output uses AND column IS NOT NULL for exclusions.

This produces an ad hoc SQL literal. For application queries, bind parameters instead of assembling SQL from values.

◎

Runs in this browser. Values stay in this browser. This creates a literal for an ad hoc query; use parameterized queries for application code and user supplied values.

Back to the tool library ↗

Need a feature from the original version? Open the current ECECH tool

How this app works

Turn a pasted value column into an ad hoc SQL IN or NOT IN condition, with apostrophe escaping and NULL logic handled. Results update as you adjust inputs and stay in this browser.