我有一张桌子_A
| id | status1 | status2 |
+------+---------+---------+
| 1 | 2 | 3 |
+------+---------+---------+
| 2 | 1 | 3 |
+------+---------+---------+
和表_B
| id | name |
+------+---------+
| 1 | yep |
+------+---------+
| 2 | nope |
+------+---------+
| 3 | maybe |
+------+---------+
我怎样才能让输出看起来像这样?
1 =不,也许;
2 =是的,也许
我试过这样的事情:
SELECT * FROM table_A a
LEFT JOIN table_B b
ON a.status1= b.id AND a.status2= b.id"