I want to reset a subset of my postgres database table. Is there a way to reset a SELECT statement without creating a view?
I need to copy part of a table to another postgres database.
Use COPY to unload it directly to disk.
Example (from a thin tutorial) using SELECT:
COPY (SELECT * FROM country WHERE country_name LIKE 'A%') TO '/usr1/proj/bray/sql/a_list_countries.copy';