[V T S] Re: MySQL + between

---------

New Message Reply About this list Date view Thread view Subject view Author view

From: Enver ALTIN (ealtin@casdb.com)
Date: Tue 07 May 2002 - 23:32:59 EEST


On Tue, 2002-05-07 at 22:59, Devrim GUNDUZ wrote:
> Merhaba,

Merhaba,

> MySQL de between kullanamiyoruz sanirim, degil mi?

Kullanabiliyoruz. MySQL Manual'den:

`expr BETWEEN min AND max'
     If `expr' is greater than or equal to `min' and `expr' is less
     than or equal to `max', `BETWEEN' returns `1', otherwise it
     returns `0'. This is equivalent to the expression `(min <= expr
     AND expr <= max)' if all the arguments are of the same type. The
     first argument (`expr') determines how the comparison is performed
     as follows:

        * If `expr' is a `TIMESTAMP', `DATE', or `DATETIME' column,
          `MIN()' and `MAX()' are formatted to the same format if they
          are constants.

        * If `expr' is a case-insensitive string expression, a
          case-insensitive string comparison is done.

        * If `expr' is a case-sensitive string expression, a
          case-sensitive string comparison is done.

        * If `expr' is an integer expression, an integer comparison is
          done.

        * Otherwise, a floating-point (real) comparison is done.

          mysql> select 1 BETWEEN 2 AND 3;
                  -> 0
          mysql> select 'b' BETWEEN 'a' AND 'c';
                  -> 1
          mysql> select 2 BETWEEN 2 AND '3';
                  -> 1
          mysql> select 2 BETWEEN 2 AND 'x-3';
                  -> 0

Sanirim yazdiginiz SQL'de bir sorun var.

Iyi calismalar

-- 
Enver (a.k.a. skyblue) - A potent hallucinogene

----------------------------------------------------------------------- Liste üyeliğiniz ile ilgili her türlü işlem için http://liste.linux.org.tr adresindeki web arayüzünü kullanabilirsiniz.

Listeden çıkmak için: 'vts-request@linux.org.tr' adresine, "Konu" kısmında "unsubscribe" yazan bir e-posta gönderiniz. -----------------------------------------------------------------------


New Message Reply About this list Date view Thread view Subject view Author view

---------

Bu arsiv hypermail 2b29 tarafindan uretilmistir.