Very close - use:
INSERT INTO TABLE_B
SELECT column_1, column_2, column_3
FROM TABLE_A
WHERE id = 1
.. assuming that TABLE_Bthere are only three columns in. Otherwise, specify the columns inserted in:
INSERT INTO TABLE_B
(column_1, column_2, column_3)
SELECT column_1, column_2, column_3
FROM TABLE_A
WHERE id = 1
And, if necessary, you can also use statically defined values:
INSERT INTO TABLE_B
(column_1, column_2, column_3, column_4)
SELECT column_1, column_2, 0, column_3
FROM TABLE_A
WHERE id = 1
source
share