SQLite VDBE opcode

Gt

This works just like the Lt opcode except that the jump is taken if the content of register P3 is greater than the content of register P1.

Jumps: P2 is an instruction address. In the listings here, a jump is drawn as an arc and the address is a link.

An example

6 of the 178 statements we compiled against the sample database use Gt. This is the one with the shortest program; the rows that use Gt 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, Halt, IdxRowid, Init, Integer, Next, Not, OpenRead, ResultRow, Rewind, Transaction, ZeroOrNull.

What the SQLite documentation says

This works just like the Lt opcode except that the jump is taken if the content of register P3 is greater than the content of register P1. See the Lt opcode for additional information.

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.

← Goto · Halt →