Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
190 views
in Technique[技术] by (71.8m points)

sql - How to search for a substring in SQLite?

Whats the most efficient way to search for a sub string in SQLite?

I'm looking at the LIKE operator.

Do I have the right idea? Has this worked well for you?

http://www.sqlite.org/lang_expr.html

Thank You.

question from:https://stackoverflow.com/questions/3671761/how-to-search-for-a-substring-in-sqlite

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Yepper, use Like. Select id from sometable where name like '%omm%' would return any row that had 'omm' anywhere in the name column.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...