I am querying all the fields of a mysql table like this -
query = """select * from %s where %s=%s;""" % (tableName,key,value)
cursor.execute(query)
Now, I would like to iterate over the results. I do not want to specify the column names which I would like to fetch as I would like to fetch all. This is part of a generic migration verification script which is supposed to do the verification for all the mysql tables. Since there will be different number of columns in different tables, I would like a general solution.
I checked https://stackoverflow.com/a/25347195/351903 but it involves specific fields.