Re: query to match '\N' - Mailing list pgsql-general

From Bertram Scharpf
Subject Re: query to match '\N'
Date
Msg-id 20070730084921.GA31545@bart.bertram-scharpf.homelinux.com
Whole thread Raw
In response to query to match '\N'  (pc <chavanpriya@gmail.com>)
Responses Re: query to match '\N'
List 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

pgsql-general by date:

Previous
From: Dave Page
Date:
Subject: Re: [pgsql-advocacy] European users mailing list
Next
From: "Luca Ciciriello"
Date:
Subject: PQntuples return type