Reputation: 1
I was basically trying to run my queries, I had no trouble with syntax but as soon as I try to run it, I get the following.
Select happy.customer_num
From happy
inner Join happy On Happy.Customer_num =
Account.Customer_num Where Account.Account_Num = "";
Error Code: 1066. Not unique table/alias: 'happy'
Does any body understand this issue, any help would be greatly appreciated.
Upvotes: 0
Views: 41
Reputation: 1269693
Presumably, one of those "happy"s should be account
:
Select h.customer_num
From happy h inner Join
account a
On h.Customer_num = a.Customer_num
Where a.Account_Num = '';
Also note the use of table aliases, so the query is easier to write and to read.
Upvotes: 1