Re: simple update on boolean

From: "Frank Millman" <frank(at)chagford(dot)com>
To: "'Cedric Boudin'" <cedric(at)dreamgnu(dot)com>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: simple update on boolean
Date: 2007-12-06 10:06:38
Message-ID: 20071206101021.009B33F438D@fcserver.chagford.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Cedric Boudin wrote:
>
> Most honourable members of the list,
>
> this is a simple one, but I can't find the solution (
> probably a forest/tree problem).
>
> update table set bolean_column = set_it_to_its_inverse where
> fk = some_value;
>

I am usually a newbie around here, but this is one that I can answer :-)

update table set boolean_column = not boolean_column where fk = some_value

HTH

Frank Millman

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Albe Laurenz 2007-12-06 11:57:14 Re: Import LDAP data to a Postgres database
Previous Message luca.ciciriello 2007-12-06 09:55:12 Orthodox use of PQtransactionStatus