mysql数据量sql 查询语句特殊字符转义

  

特殊符号不转义,你会发现sql语句增删查弄了个寂寞,什么都无效!

1
2
3
4
5
6
7
8
9
10
11
12
1,搜索a'b...

SELECT * FROM user WHERE name LIKE 'a\'b%';
2,搜索a%b...

SELECT * FROM user WHERE name LIKE 'a\%b%';
3,搜索a_b...

SELECT * FROM user WHERE name LIKE 'a\_b%';
4,搜索a\b...

SELECT * FROM user WHERE name LIKE  'a\\\\b%';

您必须才能评论!