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

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • osman7king
    New Member
    • Sep 2010
    • 61

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

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

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

    so, how can I solve this issue?
  • rski
    Recognized Expert Contributor
    • Dec 2006
    • 700

    #2
    Use 'E', like that
    Code:
    insert into test values (E'this is backslash character \\ inserted into table test');

    Comment

    Working...