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

Re: > and >= give the same result

From: "Jean-Yves F(dot) Barbier" <12ukwn(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: > and >= give the same result
Date: 2011-12-29 16:04:08
Message-ID: 20111229170408.4d2b5a7e@anubis.defcon1 (view raw or flat)
Thread:
Lists: pgsql-novice
On Thu, 29 Dec 2011 10:39:41 -0500
Frank Bax <fbax(at)sympatico(dot)ca> wrote:

> > Oops, I'm read too fast; but it dont change my PB:
> > SELECT * FROM table WHERE col>  'Y%' still returns y%&  Y%
> >
> 
> NO.  It does not.
> 
> create table barbier (col varchar);
> insert into barbier values ('y%');
> insert into barbier values ('z%');
> insert into barbier values ('Y%');
>   select * from barbier where col>'Y%';
>   col
> -----
>   y%
>   z%
> (2 rows)

Do you mean that>'Y%' is taken as a literal and don't
develop as Y* (contrary to LIKE 'Y%')?

Meaning 'Y%' was for me: 'Yahoo', 'Ybsd', 'Ycommerce', 'Ymail', etc

-- 
Damn, I need a Coke!
		-- Dr. William DeVries
		[after implanting the first artificial human heart]

In response to

Responses

pgsql-novice by date

Next:From: Thomas KellererDate: 2011-12-29 16:17:08
Subject: Re: > and >= give the same result
Previous:From: Frank BaxDate: 2011-12-29 15:39:41
Subject: Re: > and >= give the same result

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group