I've got some sql joining a few tables together
SELECT contact.contact_id,
form1.*,
form2.*
FROM contact
INNER JOIN form1
ON contact.contact_id = form1.contact_id
INNER JOIN form2
ON contact_contact_id = form2.contact_id
I want to avoid repeating the 'contact_id' column in my output without having to write every field name in the table (ie I want to keep using form1.*
and form2.*
as this will make the report much easier to maintain - fields are liable to change). Is this possible? I'm using Postgres.