
I have two tables (t1 and t2) that each have the same columns. t1 has data and t2 has changes to the data. I want a select statement that will return me all rows of t1 but, when t1.id = t2.id, I want the columns of t2 instead of t1. I am using Postgres.
t1 id | name | value ------------------- 1 | joe | 3 2 | bob | 5 3 | ted | 7 t2 id | name | value ------------------- 2 | lyn | 99 I would like a SQL statement that will give me the result: id | name | value ------------------- 1 | joe | 3 2 | lyn | 99 3 | ted | 7
Thank you
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.