Re: return true / false instead of int4 value

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: "Johnson, Shaunn" <SJohnson6(at)bcbsm(dot)com>
Cc: <pgsql-general(at)postgreSQL(dot)org>
Subject: Re: return true / false instead of int4 value
Date: 2002-06-04 16:18:23
Message-ID: 20020604091705.X3265-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, 4 Jun 2002, Johnson, Shaunn wrote:

> Howdy:
>
> I want to know if this is even possible: How
> can I return a true/false value instead of
> integer?
>
> I want to do something like this:
>
> [snip]
>
> select count(*) from t_table
> having count(*) > 1500000
>
> [/snip]
>
> But want to return a true/false (bool) result.

Wouldn't select count(*)>1500000 from t_table;

give you a true/false based on whether the count
is greater than that number?

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Doug Fields 2002-06-04 16:19:35 Re: return true / false instead of int4 value
Previous Message Peter Darley 2002-06-04 16:18:16 Re: return true / false instead of int4 value