mysql - How to add ' as a value into SQL -


dear friends on stackoverflow,

i started learning sql , i'm trying add ' value mysql community edition.

for example, in order add letter id' put

insert symbols (test_chars) values ('a'); 

but if wanted add ' how go doing that?

''' not working me , have feeling that's not how should work.

much appreciated , best regards,

waqar

the documentation best friend.

it says:

there several ways include quote characters within string:

  • a ' inside string quoted ' may written ''.
  • a " inside string quoted " may written "".
  • precede quote character escape character (\).
  • a ' inside string quoted " needs no special treatment , need not doubled or escaped. in same way, " inside string quoted ' needs no special treatment.

as can see there 3 possible solutions problem. pick favorite.


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -