I want to run an
INSERT ... SELECT
query to insert 1 selected column column with the exact amount of 2 rows from one table to another.
Along with this I would like to insert an additional column of static values.
Example
| selected column | static val |
Variable 4
Variable 9
static values 4 & 9 are specified in my php script.
Can I do this in 1 mysql query, not using php to store temporary data?
You can use
UNION ALLto select from the source table twice like this: