By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,984 Members | 1,045 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,984 IT Pros & Developers. It's quick & easy.

How can I store the character '\' in the DB?

P: 61
when I insert a values with character varying datatype and this data contain the '\' charater, this cause the warning like:
"nonstandard use of \ in a string literal "

I tried to solve it by using '\\' but I got the same warning "nonstandard use of \ in a string literal".

so, how can I solve this issue?
Oct 10 '10 #1

✓ answered by rski

Use 'E', like that
Expand|Select|Wrap|Line Numbers
  1. insert into test values (E'this is backslash character \\ inserted into table test');
  2.  

Share this Question
Share on Google+
1 Reply


Expert 100+
P: 700
Use 'E', like that
Expand|Select|Wrap|Line Numbers
  1. insert into test values (E'this is backslash character \\ inserted into table test');
  2.  
Oct 11 '10 #2

Post your reply

Sign in to post your reply or Sign up for a free account.