SQLite VDBE opcode

VCreate

P2 is a register that holds the name of a virtual table in database P1.

An example

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

CREATE VIRTUAL TABLE v2 USING fts3(x)
addropcodep1p2p3p4p5
0Init03100
1VBegin0000
2ReadCookie0320
3If3600
4SetCookie0240
5SetCookie0510
6Integer0200
7OpenWrite01050
8NewRowid0100
9Blob6300
10Insert0318
11Close0000
12Null0450
13Noop2040
14OpenWrite11050
15SeekRowid11710
16Rowid1500
17IsNull52500
18String8060table0
19String8070v20
20String8080v20
21Integer0900
22String80100CREATE VIRTUAL TABLE v2 USING fts3(x)0
23MakeRecord654BBBDB0
24Insert1450
25SetCookie0120
26Expire0000
27ParseSchema000name='v2' AND sql='CREATE VIRTUAL TABLE v2 USING fts3(x)'0
28String80120v20
29VCreate01200
30Halt0000
31Transaction01101
32Goto0100

Open it in the EXPLAIN visualizer →

Also in this program: Blob, Close, Expire, Goto, Halt, If, Init, Insert, Integer, IsNull, MakeRecord, NewRowid, Noop, Null, OpenWrite, ParseSchema, ReadCookie, Rowid, SeekRowid, SetCookie, String8, Transaction, VBegin.

What the SQLite documentation says

P2 is a register that holds the name of a virtual table in database P1. Call the xCreate method for that table.

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.

← VColumn · VDestroy →