MySQL: Get column name or alias from query
问题 I'm not asking for the SHOW COLUMNS command. I want to create an application that works similarly to heidisql, where you can specify an SQL query and when executed, returns a result set with rows and columns representing your query result. The column names in the result set should match your selected columns as defined in your SQL query. In my Python program (using MySQLdb ) my query returns only the row and column results, but not the column names. In the following example the column names