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.
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
Post a Comment