56,687
社区成员
发帖
与我相关
我的任务
分享
mysql> select * from smw_ids;
+--------+---------------+-----------+--------+-------------+
| smw_id | smw_namespace | smw_title | smw_iw | smw_sortkey |
+--------+---------------+-----------+--------+-------------+
| 1 | 1 | TT_tt_A | a | ASas |
+--------+---------------+-----------+--------+-------------+
1 row in set (0.00 sec)
mysql> desc smw_ids smw_title;
+-----------+----------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-----------+----------------+------+-----+---------+-------+
| smw_title | varbinary(255) | NO | MUL | NULL | |
+-----------+----------------+------+-----+---------+-------+
1 row in set (0.00 sec)
mysql> select * from smw_ids where cast(smw_title as char)='tT_tt_a'
-> ;
+--------+---------------+-----------+--------+-------------+
| smw_id | smw_namespace | smw_title | smw_iw | smw_sortkey |
+--------+---------------+-----------+--------+-------------+
| 1 | 1 | TT_tt_A | a | ASas |
+--------+---------------+-----------+--------+-------------+
1 row in set (0.00 sec)
mysql> select * from smw_ids where cast(smw_title as char)='tt_TT_a';
+--------+---------------+-----------+--------+-------------+
| smw_id | smw_namespace | smw_title | smw_iw | smw_sortkey |
+--------+---------------+-----------+--------+-------------+
| 1 | 1 | TT_tt_A | a | ASas |
+--------+---------------+-----------+--------+-------------+
1 row in set (0.00 sec)
mysql> desc fxs_2008;
+-------+---------------+------+-----+---------+-------
| Field | Type | Null | Key | Default | Extra
+-------+---------------+------+-----+---------+-------
| id | int(11) | YES | | NULL |
| title | varbinary(30) | YES | | NULL |
+-------+---------------+------+-----+---------+-------
2 rows in set (0.01 sec)
mysql> select * from fxs_2008;
+------+-----------+
| id | title |
+------+-----------+
| 1 | aaaaaaaaa |
| 2 | Test_tom |
+------+-----------+
2 rows in set (0.00 sec)
mysql> select *
-> from fxs_2008
-> where CONVERT(title USING utf8)='Test_Tom';
+------+----------+
| id | title |
+------+----------+
| 2 | Test_tom |
+------+----------+
1 row in set (0.00 sec)
mysql> select *
-> from fxs_2008
-> where CONVERT(title USING utf8)='test_tom';
+------+----------+
| id | title |
+------+----------+
| 2 | Test_tom |
+------+----------+
1 row in set (0.00 sec)
mysql>