I've created table1 with columns a,b,c,d which has data in it.
table2 is basically the same as table1 it has different columns order + additional column i.e. a,e,d,b,c with no data.
how can I copy the data from table1 into table2 note that column a is an id and i wish the number will stay the same.
this is what I've already tried:
insert into table2 select (a,d,b,c) from table1
this resulted in 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)
didn'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 the error: INSERT has more target columns than expressions
INSERT.