pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Joshua Drake <jd@commandprompt.com>
To: Jagadeesh <mnjagadeesh@gmail.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: can I update multiple table at a time?
Date: Thu, 9 Oct 2008 22:53:51 -0700
Message-ID: <20081009225351.0ccdaa3b@jd-laptop> (raw)
In-Reply-To: <4ba626d0-b2b5-4421-8df1-1bb39d4a858b@t39g2000prh.googlegroups.com>
References: <4ba626d0-b2b5-4421-8df1-1bb39d4a858b@t39g2000prh.googlegroups.com>

On Thu, 9 Oct 2008 22:12:04 -0700 (PDT)
Jagadeesh <mnjagadeesh@gmail.com> wrote:

> Hello Gurus,
> 
> Is it possible to update two table using single sql statement? huh?
> let me be clear
> 
> I have table master with state and date field. And in history table I
> have same fields i.e., state and date. I'm writing an update statement
> to set 'open' state records  to 'closed' state after 7. both table can
> be joined using id.
> 
> Any thoughts?

Use a transaction?

> 
> Thanks
> 


-- 
The PostgreSQL Company since 1997: http://www.commandprompt.com/ 
PostgreSQL Community Conference: http://www.postgresqlconference.org/
United States PostgreSQL Association: http://www.postgresql.us/





view thread (7+ messages)  latest in thread

Message-ID: <20081009225351.0ccdaa3b@jd-laptop>
Permalink:  ../20081009225351.0ccdaa3b@jd-laptop/
Also on:    postgresql.org/message-id/20081009225351.0ccdaa3b@jd-laptop

 · 

reply

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-admin@postgresql.org
  Cc: jd@commandprompt.com, mnjagadeesh@gmail.com
  Subject: Re: can I update multiple table at a time?
  In-Reply-To: <20081009225351.0ccdaa3b@jd-laptop>

* 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