English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
We can escape single quotes using the SELECT statement. For example, when a single quote is encountered in a name, such as 'Carol\'s'.
Let's look at the syntax.
SELECT 'SomeValue';
This is an example of how to include text within single quotes.
mysql> SELECT 'Carol\'s Taylor.;
Here is the output.
+-------------------+ | Carol's Taylor | +-------------------+ | Carol's Taylor | +-------------------+ 1 row in set (0.00 sec)