I'm using this statement in Oracle SQL Developer:
SELECT c.customerid
FROM CUSTOMERS c
INNER JOIN ORDERS o
ON c.customerid=o.customerid
.. and I get a Cartesian product (all rows from ORDERS table instead of just the matching id's). Why is this?
I mean, there are only 10 id's in CUSTOMERS and it returns me 800 rows because there are 800 orders.. I don't understand.
Thank you
SELECT c.customerid
FROM CUSTOMERS c
INNER JOIN ORDERS o
ON c.customerid=o.customerid
.. and I get a Cartesian product (all rows from ORDERS table instead of just the matching id's). Why is this?
I mean, there are only 10 id's in CUSTOMERS and it returns me 800 rows because there are 800 orders.. I don't understand.
Thank you