同じ ID 名を持つ 2 つのテーブルがあり (テーブルの設計方法を変更することはできません)、テーブル 2 の ID をクエリしようとしています。
create table table1(
id integer, -- PG: serial
description MediumString not null,
primary key (id)
);
create table table2 (
id integer, -- PG: serial
tid references table1(id),
primary key (id)
);
したがって、基本的にそれらが結合されると、次のクエリを実行すると、2 つの列に同じ名前の「id」が付けられます
select * from table1
join table2 on table1.id = table2.tid;