return column names from pyodbc execute() statement February 4, 2023 by Tarik You can get the columns from the cursor description: columns = [column[0] for column in cursor.description]