I created table1with columns a,b,c,din which there is data.
table2basically the same as table1, it has different order columns + extra ie column a,e,d,b,cwithout data.
how can I copy data from table1to table2, note that the column ais idand I want the number to remain the same.
this is what i have already tried:
insert into table2 select (a,d,b,c) from table1
this led to column "a" is of type bigint but expression is of type record
insert into table2 (a,d,b,c) values(select a,d,b,c from table1)
doesn't work either syntax error at or near "select"
insert into table2 (a,e,d,b,c) values(select a,NULL,d,b,c from table1)
got an error: INSERT has more target columns than expressions