From: Lou <lou@dayspringpublisher.com>
To: pgsql-sql@lists.postgresql.org
Subject: INSERT / UPDATE into 2 inner joined table simultaneously
Date: Wed, 6 Mar 2019 13:59:22 -0600
Message-ID: <38a1b75c-2a29-5833-cbd6-6b76dca019da@dayspringpublisher.com> (raw)
Hi everyone,
This is my first post here.
I have two tables named c and p. When using SELECT, they are linked
using an INNER JOIN like in this example: "SELECT * FROM c INNER JOIN p
ON c.id = p.c_id WHERE name = 'Jones';"
How can I INSERT new rows into both tables simultaneously with
automatically created id numbers, and how can I UPDATE both tables
simultaneously?
Lou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: lou@dayspringpublisher.com, pgsql-sql@lists.postgresql.org
Subject: Re: INSERT / UPDATE into 2 inner joined table simultaneously
In-Reply-To: <38a1b75c-2a29-5833-cbd6-6b76dca019da@dayspringpublisher.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox