Question

I'm trying to make a select, joining the columns of the table1 and the values from table2.

I'm not really sure about the statement I need to do it, but, look, I'm looking for something like this:

Was it helpful?

Solution

If you want to get all these columns on each row, you should be using a join, not union. E.g.:

SELECT colum1, column2, column3, column4, column5
FROM   table1
JOIN   table2 ON table1.id = table2.id
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top