I am running the following two queries but both of them are giving the same output.
Query 1
SELECT * FROM EMP LEFT JOIN DEPT
ON EMP.EMP_ID = DEPT.EMP_ID
Query 2
SELECT * FROM EMP INNER JOIN DEPT
ON EMP.EMP_ID = DEPT.EMP_ID
THESE both queries give the same output i.e. all rows from both the tables.
As far as I know left join
should give only rows from the first table i.e. "EMP" and not from other table (DEPT).
thanks.