(Not sure if the name of this question really makes sense, but what I want to do is pretty simple)
The table data looks something like this:
Table Foo
| bar1_id | bar2_id | other_val |
Table Bar
| bar_id | bar_desc|
How do I create a selection that returns a table that looks like this:
---------------------------------------------------------
| bar1_id | bar1_desc | bar2_id | bar2_desc | other_val |
---------------------------------------------------------
i.e. I want to grab every row from Foo and add to the column containing the description of this bar_id from Bar. Thus, there may be some lines from Bar that do not fall into the result set, but each line of Foo should be in it.
Also, this is postgres, if that matters.
source
share