我想根据“开头为”查询对结果进行排序,后跟“包含”查询的结果。如何使用 JPA、Spring 和 Mysql 来实现这一点?
最佳答案
i want to display the results in order of(starting with terms) followed by (containing terms)
这对于纯 SQL 是不可能的,因为排序发生在结果上,而不是在 where 条件的一部分上。
关于mysql - 如何在搜索查询 Jpa 中一起使用 Starts with 和 contains ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56771637/