I want to merge two tables in the same database but not under the same schema of PostgreSQL (I use DBeaver to write scripts), but fail for some examples of merging tables in PostgreSQL.
The two table have lots of columns and samples, I want to select A B from table 1, and wang to select C D,E from table 2, where B and C items are exactly the same thing but numbers contained are not totally the same. Thus I want to merge and get A (B/C) D E.
I used UNION but it shows : ERROR: each UNION query must have the same number of columns. And when I used left join it shows mistake around '.'. In the last try my code like: select A from table1 left join table2.D, table2.E using B=C