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

BETWEEN

From: Joseph Shraibman <jks(at)selectacast(dot)net>
To: "pgsql-sql(at)postgresql(dot)org" <pgsql-sql(at)postgresql(dot)org>
Subject: BETWEEN
Date: 2000-06-16 19:09:03
Message-ID: 394A7B4F.6E46321B@selectacast.net (view raw or flat)
Thread:
Lists: pgsql-sql
Why is BETWEEN inclusive?  I had assumed that it was like the english
between, which is exclusive.

playpen=# create table numbs ( a int);
CREATE

playpen=# insert into numbs values(1);
INSERT 35913 1
playpen=# insert into numbs values(2);
INSERT 35914 1
playpen=# insert into numbs values(3);
INSERT 35915 1
playpen=# insert into numbs values(4);
INSERT 35916 1
playpen=# insert into numbs values(5);
INSERT 35917 1
playpen=# insert into numbs values(6);
INSERT 35918 1
playpen=# insert into numbs values(7);
INSERT 35919 1
playpen=# select * from numbs where a between 3 and 6;
 a 
---
 3
 4
 5
 6
(4 rows)

Responses

pgsql-sql by date

Next:From: Gordon ClarkeDate: 2000-06-17 05:15:36
Subject: Null parm to a function
Previous:From: Louis-David MitterrandDate: 2000-06-16 10:54:53
Subject: Re: Antw: using max() aggregate

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