SQLite VDBE opcode

Not

Interpret the value in register P1 as a boolean value.

An example

1 of the 178 statements we compiled against the sample database use Not. This is the one with the shortest program; the rows that use Not are highlighted.

SELECT NOT (id > 5) FROM tracks
addropcodep1p2p3p4p5
0Init01100
1OpenRead1190k(2,,)0
2Rewind110100
3IdxRowid1300
4Integer1200
5Gt47368
6ZeroOrNull3240
7Not2100
8ResultRow1100
9Next1301
10Halt0000
11Transaction00101
12Integer5400
13Goto0100

Open it in the EXPLAIN visualizer →

Also in this program: Goto, Gt, Halt, IdxRowid, Init, Integer, Next, OpenRead, ResultRow, Rewind, Transaction, ZeroOrNull.

What the SQLite documentation says

Interpret the value in register P1 as a boolean value. Store the boolean complement in register P2. If the value in register P1 is NULL, then a NULL is stored in P2.

From sqlite.org's list of opcodes for SQLite 3.54.1, in the public domain. Opcodes are not a stable interface and change between releases.

← Noop · NotExists →