Oracle join issue
Posted
by
acadia
on Stack Overflow
See other posts from Stack Overflow
or by acadia
Published on 2011-01-06T03:46:36Z
Indexed on
2011/01/06
3:54 UTC
Read the original article
Hit count: 184
oracle11g
Hello,
I have 3 tables and I am joining these 2 tables as follows:
SELECT EMP.FNAME,EMP.LNAME,EMP.AGE,EMPD.TQ,EMPD.TA,CTY.CITY_NAME FROM
EMPLOYEE EMP,EMPLOYEE_DETAIL EMPD, CITY CTY
WHERE EMP.EMP_ID=EMPD.EMP_ID AND EMPD_CITY_ID=CTY.CITY_ID
I want to display records even if City record is not in CITY table. For eg. if City_ID record for say 10 is not in City table but there is an employee detail record with City_id 10 it should display City_name as null instead of not displaying the record at all.
Appreciate your help
© Stack Overflow or respective owner