MySQL, safely using reserved word in query [duplicate]
问题 This question already has an answer here: Syntax error due to using a reserved word as a table or column name in MySQL 1 answer I need to return a multidimensional array from a query with the id keys named key . (needed for object keys in amazon S3 API) example: Array ( [0] => Array ( [key] => 8 ) [1] => Array ( [key] => 7 ) [2] => Array ( [key] => 6 ) ) The problem: key is a reserved name in MySQL. I have to use the name key. The following query gives an error SELECT `file_name` AS key FROM