view raw
Rohita Khatiwada Rohita Khatiwada - 10 months ago 66
Python Question

counting rows returned in postgresql

I need to count the number of rows returned from database.By using following code

rv = plpy.execute("SELECT * FROM AA where name = 'active '")

works when some values are returned but I need to check if no values are returned: Can someone help please.