Backticks on column's #32

Closed
opened 2013-02-05 20:02:02 +00:00 by joshtronic · 2 comments
joshtronic commented 2013-02-05 20:02:02 +00:00 (Migrated from github.com)

Inject backticks on columns for scumbags that name their columns after reserved keywords. Will need to research if this is a MySQL only thing of an SQL thing.

Inject backticks on columns for scumbags that name their columns after reserved keywords. Will need to research if this is a MySQL only thing of an SQL thing.
joshtronic commented 2014-04-20 21:49:14 +00:00 (Migrated from github.com)

Here's the PostgreSQL differences that matter to this issue

  • MySQL uses nonstandard '#' to begin a comment line; PostgreSQL doesn't. Instead, use '--' (double dash), as this is the ANSI standard, and both databases understand it.
  • MySQL uses ' or " to quote values (i.e. WHERE name = "John"). This is not the ANSI standard for databases. PostgreSQL uses only single quotes for this (i.e. WHERE name = 'John'). Double quotes are used to quote system identifiers; field names, table names, etc. (i.e. WHERE "last name" = 'Smith').
  • MySQL uses ` (accent mark or backtick) to quote system identifiers, which is decidedly non-standard.
Here's the PostgreSQL differences that matter to this issue - MySQL uses nonstandard '#' to begin a comment line; PostgreSQL doesn't. Instead, use '--' (double dash), as this is the ANSI standard, and both databases understand it. - MySQL uses ' or " to quote values (i.e. WHERE name = "John"). This is not the ANSI standard for databases. PostgreSQL uses only single quotes for this (i.e. WHERE name = 'John'). Double quotes are used to quote system identifiers; field names, table names, etc. (i.e. WHERE "last name" = 'Smith'). - MySQL uses ` (accent mark or backtick) to quote system identifiers, which is decidedly non-standard.
joshtronic commented 2014-10-03 10:40:15 +00:00 (Migrated from github.com)

Closing as the backticks are MySQL only and non-standard

Closing as the backticks are MySQL only and non-standard
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
joshtronic/pickles#32
No description provided.