谢邀
是想要这样吗?
mysql> select * from tt;+-------+-------+| name1 | name2 |+-------+-------+| 1 | 2 || 1 | 12 || 1 | 212 |+-------+-------+3 rows in set (0.00 sec)mysql> select position(name1 in name2) from tt;+--------------------------+| position(name1 in name2) |+--------------------------+| 0 || 1 || 2 |+--------------------------+3 rows in set (0.00 sec)