Single vs Double Quotes in SQL: When to Use Each
By Sharon Ben-Moshe · June 25, 2026 · 4 min read
Sharon Ben-Moshe is the founder of sqlfmt, a browser-based SQL formatter and validator with misspelled-keyword suggestions across PostgreSQL, MySQL, SQLite, SQL Server, and BigQuery.
Single quotes are for string values, double quotes are for identifiers — but MySQL, SQL Server, and BigQuery bend the rule. The full guide, with examples.
Quick answer
In standard SQL, single quotes ('text') delimit string and date literals, while double quotes ("name") delimit identifiers like column and table names. So use single quotes for values you're comparing or inserting, and double quotes only when an identifier needs special characters, spaces, or case sensitivity. MySQL is the exception — it treats double quotes as strings unless ANSI_QUOTES mode is on.