【发布时间】:2021-04-04 09:35:16
【问题描述】:
我在 Postgres 中有一个专栏,例如:
name
abc def ghi
lmnop qrst uvw
xyz
有什么方法可以得到比赛和比赛的位置吗?
例如
如果我搜索“ef”,那么我应该使用如下查询获得第一个:
select * from table where name like '%ef%';
并且匹配的位置应该是 5。 如何找到比赛的位置?
【问题讨论】:
标签: sql postgresql pattern-matching