#SqlCnt is the number of rows kept by the last sql query. Load any of them with
sql row 1 … #SqlCnt.
Only sql query, sql open and sql close change it, so you can run sql exec inside a loop over the rows.
Example
Section titled “Example”sql open :memory:sql exec CREATE TABLE pets(name TEXT, hp INTEGER)sql exec INSERT INTO pets VALUES('Rex', 80), ('Buttercup', 45)sql query SELECT name, hp FROM pets ORDER BY hpfor %i 1 #SqlCnt{ sql row %i display ok %name has %hp hp}halt