Subqueries can be used in INTO and VALUES part of the INSERT statement

This weird INSERT statement below will work

The first subquery will replace traditional column specification, while the second subquery will replace VALUES part of the INSERT statement. Looks weird, but it works. The situation with SQL queries/subqueries in INSERT statement is 100% guaranteed on your exam.

 

Leave a comment

Your email address will not be published. Required fields are marked *