What is the most straightforward way to run a select statement such that the output can be inserted back into SQL later? The data set size will be very small, (probably less than 100 rows). I realize that there are DB specific import/export tools but I'm wondering if this can be done with SQL only (plus maybe some unix command line).
EDIT:
To clarify, I want to save a set of rows along the lines of:
select * from my_table where category='test'
And then, some time later, I want those matching rows to be inserted back into the same table. I had assumed that the SQL select output would be saved into a file, and the file would be re-played through a sql command line utility.