mysql> select *from test_tbl;+---------+------------+-------------+------------+
| test_id | test_title | test_author | test_time |
+---------+------------+-------------+------------+
| 1 | memory | zhiqing | 2021-01-30 |
| 3 | CPU | jieling | 2021-01-31 |
| 4 | security | jingjing | 2021-01-31 |
| 5 | network | jiejie | 2021-01-31 |
+---------+------------+-------------+------------+
4 rows in set (0.00sec)
mysql> select * from test_tbl where test_author like "%ing";+---------+------------+-------------+------------+
| test_id | test_title | test_author | test_time |
+---------+------------+-------------+------------+
| 1 | memory | zhiqing | 2021-01-30 |
| 3 | CPU | jieling | 2021-01-31 |
| 4 | security | jingjing | 2021-01-31 |
+---------+------------+-------------+------------+
3 rows in set (0.00sec)
mysql>
mysql> select * from test_tbl where test_author like "%g";## 在test_author中有结尾是g的数据
+---------+------------+-------------+------------+
| test_id | test_title | test_author | test_time |
+---------+------------+-------------+------------+
| 1 | memory | zhiqing | 2021-01-30 |
| 3 | CPU | jieling | 2021-01-31 |
| 4 | security | jingjing | 2021-01-31 |
+---------+------------+-------------+------------+
3 rows in set (0.00 sec)
mysql> select * from test_tbl where test_author like "%e%"; ##在test_author 中含有e的数据
+---------+------------+-------------+------------+
| test_id | test_title | test_author | test_time |
+---------+------------+-------------+------------+
| 3 | CPU | jieling | 2021-01-31 |
| 5 | network | jiejie | 2021-01-31 |
+---------+------------+-------------+------------+
2 rows in set (0.00 sec)
mysql> select * from test_tbl where test_author like "j%"; ## 在test_author中有开头是j的数据
+---------+------------+-------------+------------+
| test_id | test_title | test_author | test_time |
+---------+------------+-------------+------------+
| 3 | CPU | jieling | 2021-01-31 |
| 4 | security | jingjing | 2021-01-31 |
| 5 | network | jiejie | 2021-01-31 |
+---------+------------+-------------+------------+
3 rows in set (0.01 sec)
mysql>