Windows OS -PHPMYADMIN
select auth, COUNT(*) AS count from posts where auth = 1;
给出一个信息:
Your SQL query has been executed successfully
但是:
select auth, count(*) AS count from posts where auth = 1;
给出以下内容:
Showing rows 0 - 0 (1 total, Query took 0.0070 seconds.
在这里,我发现了一个关于mysql和案例敏感性的真正令人困惑的故事。
关于较低或上层案例的编写查询有什么共同的最佳实践,还是我必须对每个操作系统学习所有规则?
您是否尝试过:
select auth, count(*) AS count
from posts
where auth = 1
group by auth
;