String delimiters (MySQL)
Versie door Jeroen Strompf (overleg | bijdragen) op 27 aug 2022 om 13:48
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.
[1]:
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.