Maintaining SQL verbose results in python -


i having .sql file containing sql queries. run them using python script did :

cursor=cnx.cursor() line in open("queries_data.sql").read().split(';\n'):     cursor.execute(line) 

now want store verbose or results of each query in log file or time being print them in console.

how can done ? please help.

is there argument available in python sql connector ?

i want kind of thing each query :

query ok, 5 rows affected (0.61 sec) records: 5  duplicates: 0  warnings: 0 


Comments