[postgis-users] join multiple tables by id, and select all

Shaozhong SHI shishaozhong at gmail.com
Thu Nov 19 02:08:17 PST 2020


Hi, I tried the following for joining multiple tables by id, and select all
into a new table.

However, it will not work because id gets repeated.  How to select all
except one column?

select a.*, b.*, c.*, d.*
into new_table
from a_table a
join b_table b on a.id=b.id
join c_table c on a.id=c.id
join d_table d on a.id=d.id

Looking forward to hearing from you.

Regards,

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20201119/6a79fada/attachment.html>


More information about the postgis-users mailing list