SQLite Forum

Prepared Statements
Login
Thanks for all the pointers (no pun intended!). With these hints and those [in this thread](https://sqlite.org/forum/forumpost/e172132da8?t=h) I've got enough to try for myself.

>The sqlite3_exec() function is just a convenience interface that allows parameter free SQL queries to be executed via a single call.

Got that [sorted](https://sqlite.org/forum/forumpost/83e1e639ac?t=h).

I need to figure out this:

>select * from myTable where id between ? and ?;select * from myTable where id between ? and ?

In a prepare...step..finalize loop, one query, repeated twice, and to be executed with 2 sets of parameters (say, 0,999 and 1000, 1999), the intention being to manage the memory overheads in the calling application i.e. retrieving 1,000 records at a time.

Or should that be <i>one</i> query

>select * from myTable where id between ? and ?;

repeated n times (with sqlite3_reset() somewhere) to be able to pass n sets of parameters?

<sup>Aask</sup>