Re: [SQL] insert with "Fred's car!" - Mailing list pgsql-sql

From Bruce Momjian
Subject Re: [SQL] insert with "Fred's car!"
Date
Msg-id 199911052041.PAA16559@candle.pha.pa.us
Whole thread Raw
In response to insert with "Fred's car!"  ("Frederic boucher" <dziablo@hotmail.com>)
List pgsql-sql
> Hi,
> 
> A simple question :
> 
> How can I insert a values like
> 
> insert into tablename values('Fred's car');
> 
> I've tried "Fred's car", 'Fred''s car', etc but nothing work.. is there a 
> "\something" to pass it like

Should work.

test=> create table test (x text);CREATEtest=> insert into test values ('asdf''fred');INSERT 18569 1test=> select *
fromtest;     x     ----------- asdf'fred(1 row)
 


--  Bruce Momjian                        |  http://www.op.net/~candle maillist@candle.pha.pa.us            |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


pgsql-sql by date:

Previous
From: "Frederic boucher"
Date:
Subject: insert with "Fred's car!"
Next
From: De Moudt Walter
Date:
Subject: calulating with money type impossible ?