SQLite VDBE opcode

IdxRowid

Write into register P2 an integer which is the last entry in the record at the end of the index key pointed to by cursor P1.

An example

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

SELECT id IS TRUE FROM tracks
addropcodep1p2p3p4p5
0Init0800
1OpenRead1190k(2,,)0
2Rewind17100
3IdxRowid1200
4IsTrue21000
5ResultRow1100
6Next1301
7Halt0000
8Transaction00101
9Goto0100

Open it in the EXPLAIN visualizer →

Also in this program: Goto, Halt, Init, IsTrue, Next, OpenRead, ResultRow, Rewind, Transaction.

What the SQLite documentation says

Write into register P2 an integer which is the last entry in the record at the end of the index key pointed to by cursor P1. This integer should be the rowid of the table entry to which this index entry points.

See also: Rowid, MakeRecord.

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.

← IdxLT · If →