This message appears when a SELECT or CREATE VIEW statement, or the query expression clause of an INSERT statement, specifies the same table or view name more than once in the FROM clause, without correlation or schema qualification. The table, view, or correlation names appearing in the FROM clause must be unique. The following statement, for instance, produces this error message:
SELECT column1, column3
FROM table_name, table_name ;
If the duplicate table and view names use correlation names, the statement becomes legal, as there are now two separate instances of table
table_name
in the FROM list:
SELECT t1.column1, t2.column3
FROM table_name t1, table_name t2 ;
Tables or views sharing the same name but belonging to different schemas may also appear in the FROM clause, provided they are prefixed with their respective schema name, for example: