- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to escape single quotes in MySQL?
We can escape single quotes with the help of the SELECT statement. For instance, when single quotes are encountered in a name, eg. “Carol’s”.
Let us see the syntax.
Here is an example that display how to include text with single quotes.
mysql> SELECT 'Carol\'s Taylor.';
The following is the output.
+-------------------+ | Carol's Taylor | +-------------------+ | Carol's Taylor | +-------------------+ 1 row in set (0.00 sec)
- How to insert date in single quotes with MySQL date formats?
- Single quotes vs. double quotes in C or C++
- Using MySQL keywords in a query surrounded with single quotes?
- Single and Double Quotes in Perl
- How to escape apostrophe (') in MySQL?
- Print newline in PHP in single quotes
- How to escape backslashes in MySQL with JDBC?
- Is there a PHP function that only adds slashes to double quotes NOT single quotes
- Why does the update command in MySQL insist on using slanted single quotes?
- How to add single quotes to strings in an R data frame column?
- How to insert records with double quotes in MySQL?
- Using single quotes around database and table name isn’t working in MySQL?
- Which MySQL function can be used to append values of a column with single quotes?
- How to include quotes in comma separated column with MySQL?
- Escaping/encoding single quotes in JSON encoded HTML5 data attributes