Insert data from table1 to table2 in sql

I have two tables, t1 has 2 columns and table2 has 3 columns. I would like to insert values of t1 col1 and t1 col2 into `t2 of one column.
Deepak Sharma
Asked 29-06-2024
184

Answer (1)
hi here is code INSERT INTO t2 (col1) SELECT col1 FROM t1; INSERT INTO t2 (col2) SELECT col2 FROM t1;
Ankur Rajput
Asked 09-11-2019
45 Likes
Comments
Write comment

Submit your answer