Reputation: 41
Just trying to teach myself some basics. I keep getting the error table/view does not exist when trying to run a basic inner join
SELECT c.cus_code, c.cus_lname, c.cus_fname, i.inv_number
FROM customer c,
INNER JOIN invoice i
ON i.cus_code = c.cus_code;
--ORA-00942: table or view does not exist
00942. 00000 - "table or view does not exist"
*Cause:
*Action:
Error at Line: 3 Column: 11-
Upvotes: 1
Views: 1366
Reputation: 5565
Error is due to comma after customer c
. It should be:
SELECT c.cus_code, c.cus_lname, c.cus_fname, i.inv_number
FROM customer c
INNER JOIN invoice i
ON i.cus_code = c.cus_code
Upvotes: 4