Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想做一个查询。我不确定它在 android sql db 中是否可用。我想根据开始和结束字符以及字符串的长度进行查询。假设,在我的数据库中我有你好,如何,欢呼,亲爱的。我想从数据库中获取蜂蜜,所以我想做一个查询,比如它会找到以“h”开头并以“y”结尾的字符串和单词的长度是 5。为此,我的查询字符串是什么?
它应该是
select * from `table` where LENGTH(`field`) = 5 and `field` LIKE `h%y`