1.

How To Escape Special Characters In Sql Statements?

Answer»

There are a number of special characters that needs to be escaped (protected), if you want to include them in a character string. Here are some basic character escaping rules:

  • The ESCAPE character () needs to be escaped as (\).
  • The single quote (‘) needs to be escaped as (‘) or (“) in single-quote quoted strings.
  • The double quote () needs to be escaped as (“) or (““) in double-quote quoted strings.
  • The wild CARD character for a single character () needs to be escaped as (_).
  • The wild card character for multiple characters (%) needs to be escaped as (%).
  • The tab character needs to be escaped as (t).
  • The new LINE character needs to be escaped as (n).
  • The carriage RETURN character needs to be escaped as (R).

There are a number of special characters that needs to be escaped (protected), if you want to include them in a character string. Here are some basic character escaping rules:



Discussion

No Comment Found