I need to print the row count of the cursor while using select query using python. But it always returns -1 even the select query returns some values.
Code I've tried:
cursor = conn.cursor()
cursor.execute(query)
print(cursor.rowcount)
How to print the rowcount of the cursor?