This is how I process the records from a db in Python
code.py
conn = cx_Oracle.connect('pass the connection string')
cursor = conn.cursor()
sql = "select * from emp table"
cursor.execute(sql)
result =cursor.fetchall()
for row in result:
name = row[0]
age = row[1]
Question: Instead of hardcoding as row[0],row[1], Is there a way to get the column names directly ?