RowCell
P1 and P2 are both open cursors.
An example
1 of the 178 statements we compiled against the sample database use RowCell. This is the one with the shortest program; the rows that use RowCell are highlighted.
INSERT INTO artists_archive SELECT * FROM artists
| addr | opcode | p1 | p2 | p3 | p4 | p5 |
|---|---|---|---|---|---|---|
| 0 | Init | 0 | 14 | 0 | 0 | |
| 1 | Null | 0 | 1 | 0 | 0 | |
| 2 | OpenWrite | 1 | 8 | 0 | 3 | 0 |
| 3 | OpenRead | 0 | 2 | 0 | 3 | 0 |
| 4 | Rewind | 0 | 13 | 0 | 0 | |
| 5 | Rowid | 0 | 2 | 0 | 0 | |
| 6 | NotExists | 1 | 8 | 2 | 0 | |
| 7 | Halt | 1555 | 2 | 0 | artists_archive.id | 2 |
| 8 | RowCell | 1 | 0 | 2 | 0 | |
| 9 | Insert | 1 | 1 | 2 | artists_archive | 169 |
| 10 | Next | 0 | 5 | 0 | 0 | |
| 11 | Close | 0 | 0 | 0 | 0 | |
| 12 | Close | 1 | 0 | 0 | 0 | |
| 13 | Halt | 0 | 0 | 0 | 0 | |
| 14 | Transaction | 0 | 1 | 1 | 0 | 1 |
| 15 | Goto | 0 | 1 | 0 | 0 |
Open it in the EXPLAIN visualizer →
Also in this program: Close, Goto, Halt, Init, Insert, Next, NotExists, Null, OpenRead, OpenWrite, Rewind, Rowid, Transaction.
What the SQLite documentation says
P1 and P2 are both open cursors. Both must be opened on the same type of table - intkey or index. This opcode is used as part of copying the current row from P2 into P1. If the cursors are opened on intkey tables, register P3 contains the rowid to use with the new record in P1. If they are opened on index tables, P3 is not used.
This opcode must be followed by either an Insert or InsertIdx opcode with the OPFLAG_PREFORMAT flag set to complete the insert operation.
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.