Re: How to stuff ' in varchar2 variable

From: Scott Urman <surman_at_oracle.com>
Date: 1996/02/29
Message-ID: <4h5cc3$bsk_at_inet-nntp-gw-1.us.oracle.com>#1/1


In article <4gvtje$13q_at_hubcap.clemson.edu>, raj_at_cs.clemson.edu (Raj Rangarjan) writes:
|> Hi,
|> does anyone know how to stuff a ' character into a varchar2
|> variable. I need to get a string intialized to something like
|> this(joe's)
|>
|> my_varchar2_variable:='Joe's'
|>
|> but I can't get the ' in there- used to know how to do it but can't
|> remember- any help would be appreciated. Please post your replies here
|> or send them to raj_at_cs.clemson.edu
|>
|> Thanks
|>

You need to use two single quotes next to each other, as in

my_varchar2_variable VARCHAR2(10) := 'Joe''s';

|> --
|> *******************************************
|> -Rajasekaran Rangarajan
|> -Administrative Progamming Services
|> -Clemson University
|> -Ph:(864) 656 0731/ Fax:(864) 656-0122
|>
 

-- 
Scott Urman
"The opinions expressed here are my own, and are not necessarily that of
 Oracle Corporation"
Received on Thu Feb 29 1996 - 00:00:00 CET

Original text of this message