Re: Check for an empty result - Mailing list pgsql-general

From Craig Ringer
Subject Re: Check for an empty result
Date
Msg-id 49953A94.2060705@postnewspapers.com.au
Whole thread Raw
In response to Check for an empty result  (Eus <eus@member.fsf.org>)
Responses Re: Check for an empty result
List pgsql-general
Eus wrote:
> Hi Ho!
>
> Is there a way to check whether or not a subquery returns an empty result set?

"EXISTS"

SELECT blah FROM blah WHERE EXISTS (SELECT 1 FROM tablename WHERE ...);

> postgre check "empty result set"

It's not "postgre". It's PostgreSQL, or "postgres". This matters when
you're searching.

--
Craig Ringer

pgsql-general by date:

Previous
From: Eus
Date:
Subject: Check for an empty result
Next
From: "A. Kretschmer"
Date:
Subject: Re: Check for an empty result