Issue
I need to insert data in table 2 but it has a column 3 which is a constant. How to built query for this comdition
?
INSERT INTO table2 (column1, column2, column3)
SELECT column1, column2
FROM table1
?
Solution
You can just add your constant value after column2
from the select
INSERT INTO table2 (column1, column2, column3)
SELECT column1, column2, 'your constant value'
FROM table1
Answered By – D-Shih
Answer Checked By – Marilyn (BugsFixing Volunteer)