In my company we use an Oracle database. I've noticed everybody writes their queries like this:
SELECT p.name, p.id, o.issued_date
FROM orders o, products p
WHERE o.productid = p.id;
What is the database doing in a situation like this? Making a Cartesian product and then selecting only certain rows? That just doesn't sound right.
What is the database doing in a situation like this?
The same as when you specify an ANSI join:
SELECT *
FROM orders o
JOIN products p ON o.productid = p.id
I've noticed everybody writes their queries like this [...]
It looks like lots of people in your company got many years of experience in Oracle! I bet they also use (+)
notation for outer joins. This was the only syntax supported by Oracle prior to the 9i release.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With