cx_Oracle, is anything selected?
Diez B. Roggisch
deets at nospam.web.de
Mon Oct 31 18:52:32 EST 2005
Damjan wrote:
> Is there a way to see if the SELECT in cx_Oracle didn't return anything?
> I want to optimize the situation when the number of selected rows is zero.
> Is select count(*) the only option, seems inefficient?
I don't understand your problem - if your select doesn't return
anything, the fetch* methods on the cursor will tell you if there is any
data to expect at all. Additionally there is teh rowcount-property that
holds the number of rows the last execute* yielded.
Diez
More information about the Python-list
mailing list