This page in other versions: Unsupported versions: 7.1

4.6. Redirecting SELECT Queries

Any SELECT query can be redirected to a new table

SELECT * INTO TABLE temp FROM weather;

This forms an implicit CREATE command, creating a new table temp with the column names and types specified in the target list of the SELECT INTO command. We can then, of course, perform any operations on the resulting table that we can perform on other tables.

Submit correction

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.

Privacy Policy | About PostgreSQL
Copyright © 1996-2016 The PostgreSQL Global Development Group