Windows 操作系统 - 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.
here我发现了一个关于 MySql 和区分大小写的真正令人困惑的故事。
是否有任何关于编写查询的通用最佳实践,关于小写或大写,或者我必须为每个操作系统单独学习所有规则?
最佳答案
你试过吗:
select auth, count(*) AS count
from posts
where auth = 1
group by auth
;
关于mysql和区分大小写真让人困惑,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48910958/