In the diagram below there is a 1:1 relationship between \'DodgyOldTable\' and \'MainTable\'. Table \'Option\' contains records with \'OptionVal1\', \'OptionVal2\' and \'OptionV
11 Yrs later but might help someone:
INSERT INTO schema.tableName (col1, col2,col3, col4, col5, col6, col7)
SELECT col1,
col2,
'Static value',
CURRENT_TIMESTAMP,
'Anothe static value',
1,
(SELECT col7 FROM schema2.anotherTableName)
FROM schema.tableX;
col1 & col2 come from the same select
col3, col5 are static strings
col4 is the current system time
col6 a Num value,
col7 from a select that returns one value.
NB: Ensure the select with multiple values comes at the beginning. This is MySQL