Junit Test Application-48-동적쿼리 테스트

jaegeunsong97·2023년 8월 10일
0

Junit Bank Application 깃허브

Junit Bank Application 기록 노션

WITHDRAW

1, 3, 4번이 출금

이 뜻은 withdraw_account_id 가 1, 3, 4번 인 것만 나왔다는 것, deposit_account_id 주황색은 입급을 받은 것

DEPOSIT

5번만 입금

ALL

1, 3, 4, 5번 전부 나온다.

withdraw_account 를 inner join 하기

1번째 left join fetch -> join fetch 변경

null 을 제외한 1, 3, 4, 5번 가져옴

2개 전부 inner join 으로 바꾸면?

1번 inner join -> 1, 3, 4, 5
2번 inner join -> 3, 4, 5

2번을 찾고 2개다 inner join 이면?

1번 inner join -> 1, 3, 4, 5
2번 inner join -> 3, 4, 5

결과 값 3, 5

양쪽다 left join 하고 2번을 찾으면?

WITHDRAW 2번 찾으면?

inner join만 함 deposit을 볼 필요가 없기 때문에

profile
블로그 이전 : https://medium.com/@jaegeunsong97

0개의 댓글