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.

1 Comment
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
softwareshut

At the end we must stick to their way if need to work with them 🙂