Why does the MySQL query below give error 1066 (Not unique table/alias: 'customer')
?
SELECT customer.id, customer.firstName, account.id
FROM customer, account
INNER JOIN customer
ON customer.id = account.customerId
ORDER BY customer.id
Why does the MySQL query below give error 1066 (Not unique table/alias: 'customer')
?
SELECT customer.id, customer.firstName, account.id
FROM customer, account
INNER JOIN customer
ON customer.id = account.customerId
ORDER BY customer.id
Copyright © 2021 Jogjafile Inc.
You have listed the table
customer
twice in yourFROM
statement. Here's the fixed version: