簡體   English   中英

MySQL和區分大小寫的真正混亂

[英]mysql and case sensitivity real confusing

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.

在這里,我發現了一個關於MySql和區分大小寫的真正令人困惑的故事。

對於每個操作系統,是否存在編寫小寫或大寫查詢的通用最佳實踐,或者我必須分別學習所有規則?

你試過了嗎:

 select auth, count(*) AS count 
 from posts 
 where auth = 1
 group by auth
 ;

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM