How to find distinct rows with field in list using JPA and Spring?

前端 未结 5 1700
陌清茗
陌清茗 2020-12-01 17:45

I am using Spring to connect to the db. I have an interface extending CrudRepository Here is the query I want execute on the db: SELEC

5条回答
  •  粉色の甜心
    2020-12-01 18:27

    @Query("SELECT DISTINCT name FROM people WHERE name NOT IN (:names)")
    List findNonReferencedNames(@Param("names") List names);
    

提交回复
热议问题