You select records from one table and insert into another. As you do this in the same query, the data does not leave the database, so you do not need to store it anywhere.
Example:
insert into SomeTable (SomeId, SomeBinaryField)
select SomeId, SomeBinaryField
from SomeOtherTable
where SomeId = 42
Guffa source
share