MySQL Forums
Forum List  »  Newbie

how to search in text ?(怎么避免在TEXT字段中大小写的混合查找?)
Posted by: zhou haiping
Date: August 23, 2004 04:07AM

Example:
mysql> select * from testabc;
+------+------+------+-------+-------+
| f1 | f2 | f3 | stext | sblob |
+------+------+------+-------+-------+
| 1 | abc | abc | abc | NULL |
| 1 | ABC | ABC | aBC | NULL |
| 1 | Abc | Abc | NULL | NULL |
+------+------+------+-------+-------+
3 rows in set (0.05 sec)

mysql> select * from testabc where stext like '%b%';
+------+------+------+-------+-------+
| f1 | f2 | f3 | stext | sblob |
+------+------+------+-------+-------+
| 1 | abc | abc | abc | NULL |
| 1 | ABC | ABC | aBC | NULL |
+------+------+------+-------+-------+
2 rows in set (0.01 sec)

why the result is 2 rows with "abc" and "aBC"?

why the result not is "abc"?

How do I resolve the problem( only 1 row)?/(怎么让他只显示一行啊?或者说区分大小写?)


Options: ReplyQuote


Subject
Written By
Posted
how to search in text ?(怎么避免在TEXT字段中大小写的混合查找?)
August 23, 2004 04:07AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.