Sunday 15 July 2012

mysql - Why am I getting "#1066 - Not unique table/alias"? -


itemprop = "text">

I'm coming in time:

# 1066 - No unique table / aka: ' USER_ACCOUNT '

For the following, I have read all the answers and I believe that it should be fine. What's the problem?

  select user_session.node_id, the user_session include user_account.login_name, USER_ACCOUNT left Where are user_account.id = on USER_ACCOUNT user_session.user_id user_account.login_name = "mike@rocketmail.com" or user_account .login_name = "mikeg@looxcicon.com"    

If you want to know the the USER_ACCOUNT table twice this should work:

  select user_session.node_id, user_session include user_account.login_name left are USER_ACCOUNT on user_account.id = user_session.user_id where user_account .login_name = "mike@rocketmail.com" or USER_ACCOUNT. LOGIN_NAME = "mikeg@looxcicon.com"   

Was your query:

  Join the user_session, left USER_ACCOUNT USER_ACCOUNT   

You can ask the same table several times, but you will need to add a nickname. I do not think that your intention was however

Btw - Since the where USER_ACCOUNT criteria on the table, any need of join the left . Instead, I will replace it with INNER JOIN .

No comments:

Post a Comment