on-internet
← Community

Find Distinct results in spring data jpa

Stack Overflow ·

Im trying to fetch Distinct records, SQL query looks as follows select DISTINCT id from Table A where UserId = 'XXXX'; Currently, I have implemented this using spring data jpa @Query @Query(value = "select DISTINCT id from Table A where UserId = :userId") Can this be achived through spring data jpa query method ?

Comments

Sign in or sign up to comment and upvote.

No comments yet.