select * from user where username like "%"'五 '"%";
select * from user where username like '%五%';
这两种写法显示的结果是一致的,
结果为
| dog | bird | cat |
|---|---|---|
| foo | foo | foo |
| bar | bar | bar |
| baz | baz | baz |
| id | username | birthday | sex | address |
|---|---|---|---|---|
| 1 | 王五 | NULL | 2 | NULL |
| 26 | 王五 | NULL | NULL | NULL |
select * from user where username like "%"'五 '"%";
select * from user where username like '%五%';
这两种写法显示的结果是一致的,
结果为
| dog | bird | cat |
|---|---|---|
| foo | foo | foo |
| bar | bar | bar |
| baz | baz | baz |
| id | username | birthday | sex | address |
|---|---|---|---|---|
| 1 | 王五 | NULL | 2 | NULL |
| 26 | 王五 | NULL | NULL | NULL |
本文标题:04sql语句
本文链接:https://www.haomeiwen.com/subject/amyeuxtx.html
网友评论