I have two different database, I need move away from one DB so I replicate same scenario where table should be loaded from INSERT INTO SELECT *
statement.
However, when I do the same thing for new DB the table has different ordering from the original one.
e.g
DB1 - tbl_temp DB2 - tbl_temp
INSERT INTO DB1.tbl_temp
col1,
col2,
SELECT col1, col2
FROM DB3.tbl_source
Result is: when I use SELECT * FROM DB1.tbl_temp
col1 | col2 |
---|---|
abc | 123 |
def | 456 |
INSERT INTO DB2.tbl_temp
col1,
col2,
SELECT col1, col2 FROM DB3.tbl_source
Result is: when I use SELECT * FROM DB2.tbl_temp
col1 | col2 |
---|---|
def | 456 |
abc | 123 |
Both has same source but result has different order, is there any configuration needed to fix the issue ? Thank you