[摘要]+-----------------------+1 row in set (0.25 sec)6、locate(substring, string, [start_position]); //从s... +-----------------------+ 1 row in set (0.25 sec)6、locate(substring, string, [start_position]); //从start_position出开始查找,返回substring在string中首次出现的位置。其功能与instr类似,不过注意string与substring的位置是不一样的。 mysql> select locate('leng', 'lengxueganglengxuegang', 4); +---------------------------------------------+
|