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.
有没有办法将REGEXP这个例子中的 SQL 查询转换为 HQL 查询。
REGEXP
SELECT * FROM product m WHERE id = 19 and m.name REGEXP ('DEf|abc'); SELECT * FROM product m WHERE id = 19 and m.name REGEXP ('DEf|abc');
其中 name 是具有 json 值的列
我希望输出将显示结果,但出现错误
意外的令牌正则表达式。
HQL 没有正则表达式。
但为此你可以使用喜欢或
SELECT * FROM product m WHERE id = 19 and ( m.name like '%Def%' or m.name like '%abc%' );