postgreSQL Inserting multiple rows
You can insert multiple rows in the database at the same time:
INSERT INTO person (name, age) VALUES
('john doe', 25),
('jane doe', 20);
Insert from select
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.