不知道是不是字符集的問題,還是mysql的普通話不標準,我在下列陳述句中發現了一個問題:
select * from china where city like "任丘%" limit 10;
select * from china where city like "任丘%" limit 10;
select * from china where city like "商丘%" limit 10;
這兩個陳述句的結果是一樣的,
類似的情況如下:
select * from china where city = "溫州市"
select * from china where city = "梧州市"
臨海市 龍海市
棗陽市 益陽市
溫州市 梧州市
奇怪的查詢。。。
不知道有沒有遇到同樣問題的朋友們~
--
-- 表的結構 `china`
--
CREATE TABLE `china` (
`Id` int(11) NOT NULL,
`Name` varchar(40) default NULL,
`Pid` int(11) default NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- 匯出表中的資料 `china`
--
INSERT INTO `china` VALUES (330300, '溫州市', 330000);
INSERT INTO `china` VALUES (450400, '梧州市', 450000);
下面是查詢結果
uj5u.com熱心網友回復:
資料庫編碼:
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/115343.html
標籤:MySQL
上一篇:ACCESS 資料庫分組合計查詢
下一篇:提供程式無法確定 Double 值。例如,該行剛剛創建,未提供 Double 列的默認值,并且使用者尚未設定新 Double 值
