I am trying to do a query with an outer join, and I've always used Oracle Pl/SQL in the past, but am now trying to learn MySQL. I'm trying to join 3 tables, USERS, USER_TYPE, and GRADE. The USERS table contains column, USER_TYPE_ID, which is a foreign key to USER_TYPE, and it also contains column, GRADE_ID which is a foreign key to GRADE. I need the outer join because user types could be student, faculty, etc, and if it is a faculty member then the USER does not have a grade, hence a NULL GRADE_ID in the USER table. Here is what my query would have looked like in the past using (+) for the outer join.
SELECT A.USER_NAME
, A.USER_TYPE_ID
, B.USER_TYPE_DESC
, A.GRADE_ID
, C.GRADE_DESC
FROM USERS A
, USER_TYPE B
, GRADE C
WHERE A.USER_TYPE_ID = B.USER_TYPE_ID
AND A.GRADE_ID = C.GRADE_ID (+);
Could someone please help me translate this into a MySQL query?
Thanks in advance!