这是我没有 JOIN 语句的总用户。
mysql> SELECT COUNT(*) AS total
-> FROM users;
+--------+
| total |
+--------+
| 608000 |
+--------+
1 row in set (0.28 sec)
与LEFT OUTER JOIN
mysql> SELECT COUNT(*) AS total
-> FROM users
-> LEFT OUTER JOIN users_icon
-> ON users.uid = users_icon.iconuid
-> LEFT OUTER JOIN icon_code
-> ON users_icon.icondata = icon_code.iconid;
+--------+
| total |
+--------+
| 608084 |
+--------+
1 row in set (3.78 sec)
这里我有不同的总数。与LEFT OUTER JOIN
我如何得到总数是608000?