我想在发生特定子字符串后检索mysql中大字符串的最后一部分.请告知如何做到这一点.
例如,主要字符串包含"新德里是印度之都"."柏林是德国的首都".
我只需要检索印度和德国.我想知道如何检索特定子字符串之后发生的数据,如'capitalof'.
我需要在mysql中执行此操作.
M K*_*aid 10
您可以使用 substring_index
select
substring_index(title,'capitalof',-1)
from table1
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
5832 次 |
| 最近记录: |