Re: > and >= give the same result

From: Frank Bax <fbax(at)sympatico(dot)ca>
To:
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: > and >= give the same result
Date: 2011-12-29 13:48:37
Message-ID: 4EFC6FB5.8050201@sympatico.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On 12/29/11 08:15, Jean-Yves F. Barbier wrote:
> Hi list,
>
> I'm trying to help a friend with his queries and I've something
> strange (well, to me:):
>
> SELECT * FROM tb1 WHERE note> 'y';
>
> returns the *same* result as:
>
> SELECT * FROM tb1 WHERE note>= 'y';
>
> There's something wrong: I though I'd have:
> 1st qry: z%
> 2nd qry: y% and z%
>
> What is wrong with using '>'&| '>=' with strings?
>
> I also know there's a page talking about that in the docs, but I
> can't find it.

The string 'y%' is greater than 'y'! Therefore, both queries will return
y% and z% - where is the problem?

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Jean-Yves F. Barbier 2011-12-29 14:29:07 Re: > and >= give the same result
Previous Message Jean-Yves F. Barbier 2011-12-29 13:15:05 > and >= give the same result