SQLite VDBE opcode

IntCopy

Transfer the integer value held in register P1 into register P2.

An example

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

INSERT INTO artists (name) VALUES ('Lower case')
addropcodep1p2p3p4p5
0Init02100
1OpenWrite02030
2OpenWrite170k(2,,)0
3OpenWrite260k(2,,)0
4SoftNull2000
5String8030Lower case0
6NewRowid0100
7HaltIfNull129923artists.name1
8Affinity230DBB0
9SCopy31200
10PureFunc0126lower(1)32
11IntCopy1700
12MakeRecord6250
13SCopy3900
14IntCopy11000
15MakeRecord9280
16MakeRecord23110
17IdxInsert156216
18IdxInsert289216
19Insert0111artists57
20Halt0000
21Transaction01101
22Null0400
23Goto0100

Open it in the EXPLAIN visualizer →

Also in this program: Affinity, Goto, Halt, HaltIfNull, IdxInsert, Init, Insert, MakeRecord, NewRowid, Null, OpenWrite, PureFunc, SCopy, SoftNull, String8, Transaction.

What the SQLite documentation says

Transfer the integer value held in register P1 into register P2.

This is an optimized version of SCopy that works only for integer values.

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.

← Int64 · Integer →