when i try send:-
@Query(value = "SELECT * FROM labels where personal_ic_id=?1 and content like '%2%'",nativeQuery = true) List<Labels> searchByLabels(String personalIcId, String key);
it has been executing like:-
SELECT * FROM labels where personal_ic_id=? and content like '%?2%'
Advertisement
Answer
remove single inverted comma from like option
Use below
@Query(value = "SELECT * FROM labels where personal_ic_id=?1 and content like %?2%",nativeQuery = true)