On 2014/03/27 02:50, Scott Robison wrote:
Double quotes are part of the SQL-92 standard. I'm pretty sure they are, anyway. They are used (along with other database specific means) to delimit identifiers that would otherwise be illegal. As for using backtick to delimit identifiers, it is not mentioned in the standard. Again, as I understand it. This seems to cover it in some detail: http://stackoverflow.com/questions/10573922/what-does-the-sql-standard-say-about-usage-of-backtick
Double quotes are not part of the standard, just allowed by most systems in lieu of single quotes, but you are correct about back-quotes not being part of the standard either, but they will be understood by most SQL engines to mean `NOT a string`. (Which is why it is easier to use them in stead of double quotes around things that are explicitely not strings, like identifiers). What is in the standard seems to not always be adhered to and different in every Engine, but my advice was more towards making life easier on the programmer with respect to the SQL, not prescribing standard adherence at all - though I would strongly advise avid use of legibility punctuation and format as they are great tools for being able to comprehend your own SQL 6-months down the line.
I'm somewhat a fan of MSSQL's brackets for the above reason - looking at a complex bit of SQL in MSSQL guise might look cumbersome with those very bold word-boundaries, but you cannot ever claim that it isn't vividly clear in one glance which bits are identifiers and which not, though it's hard to make a real case for it.
_______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users