Re: between syntax

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Markus Bertheau <twanger(at)bluetwanger(dot)de>
Cc: postgres sql list <pgsql-sql(at)postgresql(dot)org>
Subject: Re: between syntax
Date: 2001-11-16 15:43:25
Message-ID: 26131.1005925405@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Markus Bertheau <twanger(at)bluetwanger(dot)de> writes:
> shouldn't
> 'between 1 and 7'
> return the same results as
> 'between 7 and 1'
> ?

Nope. SQL92 section 8.3 defines BETWEEN thusly:

6) "X BETWEEN Y AND Z" is equivalent to "X>=Y AND X<=Z".

regards, tom lane

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Jeff Eckermann 2001-11-16 16:19:42 Re: Insert values from one existing table into a new table.
Previous Message frbn 2001-11-16 13:40:52 SELECT * FROM t where p or q;