I tried your SQL statement in mysql command line it works for me.
mysql> SELECT CONCAT('My','\'', 'QL'); +-------------------------+ | CONCAT('My','\'', 'QL') | +-------------------------+ | My'QL | +-------------------------+
There are several ways to include quote characters within a string:
A “'” inside a string quoted with “'” may be written as “''”.
A “"” inside a string quoted with “"” may be written as “""”.
Precede the quote character by an escape character (“\”).
A “'” inside a string quoted with “"” needs no special treatment and need not be doubled or escaped. In the same way, “"” inside a string quoted with “'” needs no special treatment.
In reply to Re: dbi mysql concat interpolation
by vinoth.ree
in thread dbi mysql concat interpolation
by lykich
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |