SQLite Forum

Retrieve a record and delete it
Yes.  It is called a transaction.

SELECT whopee FROM dickiedee WHERE yummy=fruitcake;
DELETE FROM dickiedee WHERE yummy=fruitcake;

Changes made by a database connection within a transaction cannot be seen by any other connection.  Also, when a connection has an "intent" lock on the database, no other connection may modify the database.

This is called ACID (not d-lysergic acid diethylamide by the way) and is a property of some database systems including SQLite.