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
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You have listed the table
customertwice in yourFROMstatement. Here’s the fixed version: