From: Andrew Sullivan <ajs@crankycanuck.ca>
To: pgsql-sql@postgresql.org
Subject: Re: Update in all tables
Date: Wed, 22 Feb 2006 16:13:48 -0500
Message-ID: <20060222211348.GE8741@phlogiston.dyndns.org> (raw)
In-Reply-To: <1140631146.5580.5.camel@Desarrollo>
References: <1140631146.5580.5.camel@Desarrollo>
On Wed, Feb 22, 2006 at 11:59:06AM -0600, Judith Altamirano Figueroa wrote:
> Hello everybody I need to update a field with the same value in the
> tables of my data base but this field exists in almost all tables and
> has the same value, I don't want to code a script, so my question is if
> there is some way to update that field with a query and affects all the
> tables that contain the field?
No, sorry. While we're at it, though, if you have the same field in
several tables, it's a good sign that your database is badly
normalised. You shouldn't have to update more than one table (which
is why there isn't a way to do this automatically).
A
--
Andrew Sullivan | ajs@crankycanuck.ca
Unfortunately reformatting the Internet is a little more painful
than reformatting your hard drive when it gets out of whack.
--Scott Morris
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: ajs@crankycanuck.ca
Subject: Re: Update in all tables
In-Reply-To: <20060222211348.GE8741@phlogiston.dyndns.org>
* 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