Page History
...
SQL | JPA |
---|---|
public interface AddressRepo extends CrudRepository<Address, Long>{ addressRepo.findBySex("여"); |
필터 조건 조합및 연산자
SQL | JPA | |
---|---|---|
< | WHERE 44 < age |
findByAgeGreaterThan(int age); | |
<= | WHERE 44 <= age |
findByIdGreaterThanEqual(); | |
> | WHERE age < 44 |
findByAgeLessThan(int age); | |
범위 | WHERE age BEETWEEN 10 and 20 |
findByAgeBetween(int low,int high); | |
AND | WHERE 40 < age AND sex='남' |
findByAgeGreaterThanAndSex(int age,String sex); | |
OR | WHERE 40 < age OR sex='여' |
findByAgeGreaterThanOrSex(int age,String sex); |
Ctrl+Space를 누르면, 검색조건 Tip보기가가능하니 참고
...