标签为 "inner join" 的存档

mysql – left join 唯一 用法介绍

有两个表如下结构:
test_join_a

+----+----------+------+
| id | username | flag |
+----+----------+------+
|  1 | a        |    1 |
|  2 | a        |    0 |
|  3 | b        |    1 |
|  4 | c        |    1 |
+----+----------+------+

test_join_b

+------+-----------+
| idb  | usernameb |
+------+-----------+
|   11 | a         |
|   12 | b         |
|   13 | b         |
+------+-----------+

Read more…