Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: Retorno de tipo boolean


  • From: Calabaza <calalinux(at)gmail(dot)com>
  • To: pgsql-es-ayuda(at)postgresql(dot)org
  • Subject: Re: Retorno de tipo boolean
  • Date: Sun, 29 Jun 2008 03:19:29 -0400
  • Message-id: <958993320806290019l4de919b3med3887d76389a89(at)mail(dot)gmail(dot)com>

El día 28 de junio de 2008 23:24, Eduardo Villagrán Morales
<eduardo(dot)villagran(dot)morales(at)gmail(dot)com> escribió:
> Hola a todos,
> quisiera saber si existe alguna forma de retornar los booleans con su
> valor entero (0,1) en vez de 't' o 'f'.

En la configuració no se, pero lo podrias hacer así.

Select
case
when columabooleana is true then 1 else 0
end as columnaboleana
from tutabla;

Espero que te sirva, Un abrazo
-- 
§~^Calabaza^~§ from Villa Elisa, Paraguay



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group