sql add column from another table code example
Example 1: sql add column after another
ALTER TABLE myTable ADD myNewColumn VARCHAR(255) AFTER myOtherColumn
Example 2: insert select
INSERT INTO table2
SELECT * FROM table1
WHERE condition;
ALTER TABLE myTable ADD myNewColumn VARCHAR(255) AFTER myOtherColumn
INSERT INTO table2
SELECT * FROM table1
WHERE condition;