Re: change the last bit

Поиск
Список
Период
Сортировка
От Tony Li
Тема Re: change the last bit
Дата
Msg-id 7C688D76-D762-11D8-BAF5-000A95D1475E@tony.li
обсуждение исходный текст
Ответ на change the last bit  (homecurr@yahoo.com)
Список 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 по дате отправления:

Предыдущее
От: Jean-Luc Lachance
Дата:
Сообщение: Re: change the last bit
Следующее
От: raj veluchamy
Дата:
Сообщение: nmap not showing postgres