Error 1066: Not unique table/alias
Error Code
SQLSTATE
Error
Description
1066
42000
ER_NONUNIQ_TABLE
Not unique table/alias: '%s'
Possible Causes and Solutions
In order to avoid ambiguity, a table name or alias must uniquely identify an object. There are many situations where this could occur.
For example, HANDLER statements use unqualified table names, requiring the use of an alias in certain contexts. For example:
In the previous example, the HANDLER was opened with the t1 table name. Since HANDLERs use unqualified table names, trying to access another table with this same name, even though it's in another database, will result in ambiguity. An alias needs to be used to avoid the ambiguity:
This page is licensed: CC BY-SA / Gnu FDL
Last updated
Was this helpful?