SELECT /*+INDEX(WRK001TL_TEMP, IX_WRK001TL_TEMP_STD_ID)*/
WRK001_SOCIAL_ID,
WRK001_STD_ID,
WRK001_KOR_NM,
WRK001_SCH_YEAR,
WRK001_SEX,
WRK001_CELL,
WRK001_EMAIL,
WRK001_REC_STS_MIN_NM,
WRK001_DPT_NM,
WRK001_GPA1,
WRK001_TEL,
WRK001_ADDR,
WRK001_COL_NM
FROM WRK001VW WRK001
INNER JOIN WRK002VWT WRK002
ON WRK002.WRK002_STD_ID = WRK001.WRK001_STD_ID
WHERE WRK002_STD_ID = '123'
AND WRK002_DIV='G' AND
ORDER BY WRK001_STD_ID DESC
글로쓰자면 WRK002VWT 이 테이블에 WRK002_DIV 컬럼에 'G'값을 가진사람과 'NULL'(값이없는)사람이있습니다.
제가 구하고자 하는답은 WRK002_STD_ID='123' 을 검색했을때 윗문항처럼했을땐 'G'값이 있는사람만검색됫는데요. 저렇게 하면 'G'값이 없는사람은 오류가납니다.
만약에 'G'값이 없어도 검색이 되게하는 방법이없을까요??