我正在尝试编写一个查询来查找除此之外没有空格的字符串。这意味着'xx applexx','xxapple xx'和'xx apple xx'是不可接受的,但'xxapplexx'应该被查询出来。
我试过了
select a
from b
where b.c not rlike '(an apple | an apple)'
但表达方式似乎是错误的。
更多示例:假设我们在数据库中有 4 条记录:
Name Data
a I have an appleYo
b I havean apple Yo
c I have an apple Yo
d I havean appleYo
预期的结果应该是:
Name Data
d I havean appleYo