|
Posted by Toby A Inkster on 07/16/07 05:43
Jerry Stuckle wrote:
> Nope, actually both are non-standard extensions. Quotes have no
> definition in standard SQL. Rather, table/column names can't be
> reserved words like GROUP, COLUMN, etc.
No -- Andy was right. ANSI SQL (and the later ISO editions) specifies that
double-quotes may be used to quote identifiers. Single quotes are used for
strings; backticks aren't used for anything in particular.
This is one of MySQL's most annoying quirks: in its normal mode it accepts
double-quotes for string values and insists on only backtick-quoted or
unquoted literals. Putting MySQL into ANSI mode fixes it.
--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.12-12mdksmp, up 25 days, 9:19.]
demiblog 0.2.0 Released
http://tobyinkster.co.uk/blog/2007/06/28/demiblog-0.2.0/
[Back to original message]
|