Web/SpringBoot
[JPA] nativeQuery where in() 사용
hjkongkong
2022. 9. 14. 21:47
@Query(value = "SELECT name FROM myDB where id in (:id)", nativeQuery = true)
public List<String> selectNameWithID(@Param(value = "id") List<String> id);
Interface
List<String> NameList = MytRepo.selectNameWithPno(IdList);
이렇게 상용하면 된다.