日期:2014-05-16 浏览次数:20680 次
mysql> create table test(a varchar(30)); Query OK, 0 rows affected (0.34 sec) mysql> insert into test values('TTai'), ('t_t'), ('0T_T0'), ('san~qiang'), ('sanqiang'), ('gerenyouxi'), ('gren\\youxi'); Query OK, 7 rows affected (0.08 sec) Records: 7 Duplicates: 0 Warnings: 0 mysql> select * from test; +------------+ | a | +------------+ | TTai | | t_t | | 0T_T0 | | san~qiang | | sanqiang | | gerenyouxi | | gren\youxi | +------------+ 7 rows in set (0.02 sec) mysql> select * from test where a like '%T_T%'; +-------+ | a | +-------+ | t_t | | 0T_T0 | +-------+ 2 rows in set (0.00 sec) mysql> select * from test where a like '%san~%'; +-----------+ | a | +-----------+ | san~qiang | +-----------+ 1 row in set (0.00 sec)