MySQL: Get column name or alias from query

后端 未结 10 1757
死守一世寂寞
死守一世寂寞 2020-11-28 20:04

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 w

10条回答
  •  情深已故
    2020-11-28 20:32

    Try:

    cursor.column_names
    

    mysql connector version:

    mysql.connector.__version__
    '2.2.9'
    

提交回复
热议问题