| [ Web Proxy ] |
| Viewing: https://riptutorial.com/postgresql/example/8468/insert-from-select | [Back] [Original] |
[logo rip]
You can insert data in a table as the result of a select statement:
INSERT INTO person SELECT * FROM tmp_person WHERE age < 30;
Note that the projection of the select must match the columns required for the insert. In this case, the tmp_person table has the same columns as person.
| Web Proxy Viewer | New URL | Original Page |