clear markdown compare help best fiddles feedback
clear markdown feedback
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0. 3601434 fiddles created (47990 in the last week).

create table t1 ( id int not null, planet varchar(20) not null ) ;
 hidden batch(es)


insert into t1 (id, planet) values (1, 'jupiter');
1 rows affected
 hidden batch(es)


insert into t1 (id, planet) values (2, 'earth');
1 rows affected
 hidden batch(es)


create table t2 ( id int not null, planet varchar(20) not null ) ;
 hidden batch(es)


insert into t2 (id, planet) values (1, 'jupiter');
1 rows affected
 hidden batch(es)


insert into t2 (id, planet) values (2, 'earth');
1 rows affected
 hidden batch(es)


SELECT * FROM t1 NATURAL JOIN t1;
ERROR: table name "t1" specified more than once
 hidden batch(es)


SELECT id, planet FROM t1 NATURAL JOIN t1 t2;
id planet
1 jupiter
2 earth
 hidden batch(es)


SELECT * FROM t1 NATURAL JOIN t2;
id planet
1 jupiter
2 earth
 hidden batch(es)


SELECT id, planet FROM t1, t1;
ERROR: table name "t1" specified more than once
 hidden batch(es)


SELECT id, planet FROM t1 CROSS JOIN t1;
ERROR: table name "t1" specified more than once
 hidden batch(es)


SELECT id, planet FROM t1, t2 t1;
ERROR: table name "t1" specified more than once
 hidden batch(es)