如何在SQLite中搜索子字符串? [英] How to search for a substring in SQLite?
本文介绍了如何在SQLite中搜索子字符串?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在SQLite中搜索子字符串最有效的方法是什么?
Whats the most efficient way to search for a sub string in SQLite?
我正在寻找LIKE运算符。
I'm looking at the LIKE operator.
我有正确的主意吗?
http:/ /www.sqlite.org/lang_expr.html
谢谢。
推荐答案
Yepper,使用赞。 从某个表中选择ID,其中%omm%
之类的名称将返回名称列中任何位置带有 omm的行。
Yepper, use Like. Select id from sometable where name like '%omm%'
would return any row that had 'omm' anywhere in the name column.
这篇关于如何在SQLite中搜索子字符串?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文