pturmel
7
I know of no way to do that with MS SQL Server. If you adopt a competent database technology, you can use SQL UNNEST() and similar technologies:
However, most people would combine the SELECT and the INSERT in a single statement, using this general syntax:
INSERT INTO someTable (someColumns....)
SELECT matchingColumns....
FROM ....
In the matchingColumns
list of expressions, you might include expressions like:
? AS aColumnName
to inject desired constants into every new row.