Re: query to match '\N'

From: Bertram Scharpf <lists(at)bertram-scharpf(dot)de>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: query to match '\N'
Date: 2007-07-30 08:49:21
Message-ID: 20070730084921.GA31545@bart.bertram-scharpf.homelinux.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

Am Freitag, 27. Jul 2007, 18:35:21 -0000 schrieb pc:
> I have a table test with columns col1 col2.col2 contains an entry
> '\N' .I want to select all entries which have '\N' in col2.How do i
> do that?
>
> select * from test where col2 like '\N' ;
> select * from test where col2 like '\\N' ;

select * from test where col2 like E'\\\\N';
select * from test where col2 = E'\\N';

Why use `like' here at all?

Bertram

--
Bertram Scharpf
Stuttgart, Deutschland/Germany
http://www.bertram-scharpf.de

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Luca Ciciriello 2007-07-30 09:33:55 PQntuples return type
Previous Message Dave Page 2007-07-30 07:47:38 Re: European users mailing list