From: Joseph Shraibman <jks@selectacast.net>
To: pgsql-sql@postgresql.org <pgsql-sql@postgresql.org>
Subject: BETWEEN
Date: Fri, 16 Jun 2000 15:09:03 -0400
Message-ID: <394A7B4F.6E46321B@selectacast.net> (raw)
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)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: jks@selectacast.net
Subject: Re: BETWEEN
In-Reply-To: <394A7B4F.6E46321B@selectacast.net>
References: <394A7B4F.6E46321B@selectacast.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox