ClickHouse Versus MySQL Handling of Double Quotes

March 4, 2020
Author
Peter Zaitsev
Share this Post:

If you’re a MySQL user trying ClickHouse, one thing which is likely to surprise – and annoy you – is the handling of Double Quotes. In MySQL, you can use both double quotes and single quotes to quote strings, and as an example, these two queries are equivalent:

This means that many of us tend to use single quotes and double quotes interchangeably. This is not the case, however, in ClickHouse.

ClickHouse only allows using single quotes to quote strings while double quotes are used to quote identifiers (if you want to use special characters in the column name or something).

It is worth noting that it is ClickHouse’s behavior, not MySQL’s, according to the SQL Standard. In fact, if you set MySQL to ANSI SQL compatibility you will get a similar error message:

Unfortunately, there is no similar option in ClickHouse to allow double quotes for string quoting, so you may need to make this change when converting your queries to ClickHouse.

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments

Far
Enough.

Said no pioneer ever.
MySQL, PostgreSQL, InnoDB, MariaDB, MongoDB and Kubernetes are trademarks for their respective owners.
© 2026 Percona All Rights Reserved