On 2017/11/11 7:23 PM, Bart Smissaert wrote:
Yes, that this is mainly for SQLite and thanks for explaining and that is
what I thought.
I think square brackets are better than double quotes as it looks better
and parsing SQL
gets easier as the opening and closing character are not the same. But then
for compatibility
with other DB's double quotes are better.

I agree, the square brackets can be very easy on the eyes when trying to decipher SQL from ASCII soup, and no doubt this was M$'s reasoning when introducing it, but these days with syntax highlighting available near everywhere, the point is a bit moot.

The beauty of double-quotes is that it is the SQL standard and is acceptable by all 90% of DB engines (except of course notoriously where [ and ] is a must) which make multi-platform SQL easier if you keep to it - except, non-quoted identifiers IS actually accepted 100% universally (unless there's an edge case I am unaware of).

I design everything to be non-Keyword, non-funny so that it NEVER needs quoting. The possible permutations of using only Alphanumerics is more than all the words you have ever spoken in your lifetime, if not more than all the words that have ever been spoken in totality... There is just no reason to have to go funny-char++ (unless perhaps you are programming in Russian/Chinese).

That said, as Richard pointed out, it can be beneficial to use those quotes in protecting SQL code from all future SQLite Keyword additions, but even so, the chances of adding a keyword I've used as an identifier is infinitesimally small, so I'll be a Maverick and keep going lite. :)

sqlite-users mailing list

Reply via email to