本文介绍了SQLite 查询,'LIKE'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从我的数据库中检索信息.
我有像 Lim Won MongLimited 这样的词.

I am trying to retrieve information from my database.
I have words like Lim Won Mong and Limited.

如果我进行查询,SELECT name FROM memberdb WHERE name LIKE '%LIM%',它会同时显示 Lim Won MongLimited> 而我只想要 Lim Won Mong 的数据.

If I do my query, SELECT name FROM memberdb WHERE name LIKE '%LIM%', it displays both Lim Won Mong and Limited and I only want data from Lim Won Mong.

我应该如何重写我的查询?

How should I rewrite my query?

推荐答案

执行以下查询:

select name from memberdb where name like '% LIM %' OR name like "LIM %" OR name like "% LIM" OR name like "LIM"

这篇关于SQLite 查询,'LIKE'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-13 00:03