INSERT ... SELECT Statement

Description

If you use the SELECT query in the INSERT statement, you can insert query results obtained from at least one table. The SELECT statement can be used in place of the VALUES keyword, or be included as a subquery in the column value list next to VALUES. If you specify the SELECT statement in place of the VALUES keyword, you can insert multiple query result records into the column of the table at once. However, there should be only one query result record if the SELECT statement is specified in the column value list.

In this way, you can extract data from another table that satisfies a certain retrieval condition, and insert it into the target table by combining the SELECT statement with the INSERT statement.