MySQL: how to quote or escape field names?

Posted by DrStalker on Server Fault See other posts from Server Fault or by DrStalker
Published on 2010-03-19T00:50:05Z Indexed on 2010/03/19 0:51 UTC
Read the original article Hit count: 300

Filed under:

Recently I was given a MySQL DB that included a field named time-taken, which caused errors when used in a select because of the minus sign.

In this case I was able to rename the field, but for future reference how can field names be quoted or escaped in a MySQL query?

© Server Fault or respective owner

Related posts about mysql