Paste this into a new question or an answer at dba.stackexchange.com:
<!-- --> > create table t1 > ( id int not null, > planet varchar(20) not null > ) ; > > <pre> > ✓ > </pre> <!-- --> > insert into t1 (id, planet) values (1, 'jupiter'); > > <pre> 1 rows affected > </pre> <!-- --> > insert into t1 (id, planet) values (2, 'earth'); > > <pre> 1 rows affected > </pre> <!-- --> > create table t2 > ( id int not null, > planet varchar(20) not null > ) ; > > <pre> > ✓ > </pre> <!-- --> > insert into t2 (id, planet) values (1, 'jupiter'); > > <pre> 1 rows affected > </pre> <!-- --> > insert into t2 (id, planet) values (2, 'earth'); > > <pre> 1 rows affected > </pre> <!-- --> > SELECT * FROM t1 NATURAL JOIN t1; > > <pre> > ID | PLANET > -: | :------ > 1 | jupiter > 1 | jupiter > 2 | earth > 2 | earth > </pre> <!-- --> > SELECT id, planet FROM t1 NATURAL JOIN t1 t2; > > <pre> > ID | PLANET > -: | :------ > 1 | jupiter > 2 | earth > </pre> <!-- --> > SELECT * FROM t1 NATURAL JOIN t2; > > <pre> > ID | PLANET > -: | :------ > 1 | jupiter > 2 | earth > </pre> <!-- --> > SELECT id, planet FROM t1, t1; > > <pre> > ORA-00918: column ambiguously defined > </pre> <!-- --> > SELECT id, planet FROM t1, t2 t1; > > <pre> > ORA-00918: column ambiguously defined > </pre> *db<>fiddle [here](https://dbfiddle.uk/?rdbms=oracle_11.2&fiddle=a520a84ddb6e0df1941d378275511b7d)*
back to fiddle