String delimiters (MySQL)

Uit De Vliegende Brigade
Naar navigatie springen Naar zoeken springen

I use to use " as string delimiters. However (2022.08): That's not how MySQL wants me to do it → Use ' to avoid complications like with escaping.


You should use single-quotes for string delimiters. The single-quote is the standard
SQL string delimiter, and double-quotes are identifier delimiters (so you can use 
special words or characters in the names of tables or columns).

In MySQL, double-quotes work (nonstandardly) as a string delimiter by default (unless
you set ANSI SQL mode). If you ever use another brand of SQL database, you'll benefit
from getting into the habit of using quotes standardly.