How can I join two tables with different number of rows in MySQL?

前端 未结 3 1555
野性不改
野性不改 2021-01-13 11:00

I have two tables which I want to connect.

TABLE_A:

+-----------+-----------+---------+
| row_id    | category  | val_1   |
+-----------+----------         


        
3条回答
  •  离开以前
    2021-01-13 11:50

    If you want all the results, you need an outer join, not an inner one. (Inner only returns the rows where there is a match; outer returns all rows, with the matching rows "stitched together")

提交回复
热议问题