Skip to content Skip to sidebar Skip to footer

How To Store Count Values In Python

I want to compare two tables based on their total number of rows. So i use count(*) to count the total number of rows in both table. My code is: cur1.execute ('''SELECT COUNT(*) FR

Solution 1:

cursor.fetchone() 

gives you the result directly..so no need to take its zeroeth element..what you want is given to you directly when you say:

row = cur1.fetchone()

Post a Comment for "How To Store Count Values In Python"