title: How to get field names when running plain sql query in django
body: <p>In one of my django views I query database using plain sql (not orm) and return results. </p>
  
  <pre><code>sql = "select * from foo_bar"
  cursor = connection.cursor()
  cursor.execute(sql)
  rows = cursor.fetchall()
  </code></pre>
  
  <p>I am getting the data fine, but not the column names. How can I get the field names of the result set that is returned?</p>