Re: Question

From: <vhikida(at)inreach(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Question
Date: 2003-10-14 18:57:57
Message-ID: 45701.146.74.1.99.1066157877.squirrel@webmail.inreach.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

If you are experienced in Oracle, this might be confusing since Oracle
treats empty string and NULL as being the same.

> On Mon, 13 Oct 2003, Robert Partyka wrote:
>
>> why such condition:
>> foofield not like '%bar%'
>>
>> where foofield is varchar
>>
>> returns false (or rather even ignore row) on record where foofield is
>> null
>
> Actually, it probably returns unknown(NULL) on such records.
> NULL LIKE '%bar%' is unknown, so
> NULL NOT LIKE '%bar%' is also unknown.
>
> This is because NULL isn't the same as empty string, nor is it the
> absence of a value, but it's an unknown value.
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message B.W.H. van Beest 2003-10-14 19:02:13 Re: How to list which tables are available?
Previous Message Sean Chittenden 2003-10-14 18:48:23 Re: int1?