Try Opteryx

Not in list

Returns true when the left operand does not match any element in the right-hand list or array.

Category: comparison

SQL symbol: NOT IN

Syntax

sql
<value> NOT IN (<item> [, ...])
<value> NOT IN <array>

Parameters

Returns

boolean

Examples

sql
SELECT name FROM $planets WHERE name NOT IN ('Earth', 'Mars') LIMIT 3;
Mercury
Venus
Jupiter

Signatures

  • boolean NOT IN array → boolean
  • date NOT IN array → boolean
  • decimal NOT IN array → boolean
  • float NOT IN array → boolean
  • integer NOT IN array → boolean
  • nvarchar NOT IN array → boolean
  • timestamp NOT IN array → boolean
  • varbinary NOT IN array → boolean
  • varchar NOT IN array → boolean

Notes

Like !=, a row whose value is NULL answers NULL rather than true, so it does not survive a WHERE clause.

See Also