Re: interval query.

From: Blaise Carrupt <bc(at)mjtsa(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: interval query.
Date: 2001-01-31 12:06:30
Message-ID: 200101311206.MAA22252@mjtsa.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

> Is there some way to make interval query?
>
> What I need is when the town's id=9999 I want to make query
> where id=9999 OR id=[3..12] for example. I could generate bunch of OR's
> like id=3 OR id=4 ... but is there some more elegant solution?
>

This should work : WHERE id = 9999 OR id BETWEEN(3 AND 12).

Regards

______________
B. Carrupt

Browse pgsql-sql by date

  From Date Subject
Next Message Som 2001-01-31 12:15:25 FastPath protocol SQLException
Previous Message Som 2001-01-31 11:20:10 Image insertion by using BLOB