DEV Community

loading...

Discussion on: Example of complex SQL query to get as much data as possible from Database.

Collapse
tyzia profile image
Andrei Navumau Author

Hi, Unfrozen Caveman Dev.
Thank you for your comment.

To your questions:

  1. What I wanted back? - As much information as possible about all employees. This, basically, made me think of LEFT JOIN to employees table, so that I don't miss anyone in this list.
  2. I was using Oracle SQL developer to access my database.

I appreciate your feedback.

Collapse
ericschillerdev profile image
Unfrozen Caveman Dev

Makes sense. Then yes, you used the correct join. And it's worth noting that JOIN syntax is slightly different in different systems, so it's worth specifying a little more clearly which join you're using.

INNER JOIN instead of JOIN, LEFT OUTER JOIN, etc. I can't remember, but I think those work in Oracle just fine, and will work across a few other systems.

If I'm wrong, no worries, just a readability thing.

Forem Open with the Forem app