Re: Conditional on Select List - Mailing list pgsql-general

From Douglas McNaught
Subject Re: Conditional on Select List
Date
Msg-id 5ded07e00805130909g40dc6f7v2c8f1d22e461eb8c@mail.gmail.com
Whole thread Raw
In response to Conditional on Select List  (Fernando <fernando@ggtours.ca>)
List pgsql-general
On Tue, May 13, 2008 at 11:52 AM, Fernando <fernando@ggtours.ca> wrote:
>
>  Is it possible to do this?
>
>  SELECT IF(COUNT(colname) > 0, TRUE, FALSE) AS colname FROM table;

You should be able to use CASE for this.

-Doug

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Conditional on Select List
Next
From: Kevin Hunter
Date:
Subject: Re: PG -v- MySQL