Re: change the last bit - Mailing list pgsql-general

From Tony Li
Subject Re: change the last bit
Date
Msg-id 7C688D76-D762-11D8-BAF5-000A95D1475E@tony.li
Whole thread Raw
In response to change the last bit  (homecurr@yahoo.com)
List pgsql-general



On Jul 12, 2004, at 11:07 AM, homecurr@yahoo.com wrote:

> I have a int4 coloumn, and I want to change the last bit the the
> number in this column to 0. How can I do it?
>

cfgtools=# \d delme
      Table "public.delme"
  Column |  Type   | Modifiers
--------+---------+-----------
  num    | integer |

cfgtools=# select * from delme;
  num
-----
    3
    4
    5
(3 rows)

cfgtools=# update delme set num = num & x'fffffffe'::int4 where num = 3;
UPDATE 1
cfgtools=# select * from delme;
  num
-----
    4
    5
    2
(3 rows)

cfgtools=#


pgsql-general by date:

Previous
From: Jean-Luc Lachance
Date:
Subject: Re: change the last bit
Next
From: raj veluchamy
Date:
Subject: nmap not showing postgres