I'm trying to insert records into a table where one of the columns comes from another table.
The other two columns are the same for each record.
All three columns are keys.
I'm trying this embedded INSERT SELECT which I see is not allowed?
INSERT INTO TABLE (COLUMN_A, COLUMN_B, COLUMN_C)
VALUES (1,(SELECT COLUMN_NAME FROM TABLE) ,2)
Your syntax is off - this is the correct syntax for this:
Insert Into Table
(Column_A, Column_B, Column_C)
Select 1, Column_Name, 2
From OtherTable
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With