I am on Oracle-12c with Python-3 and cx-oracle.
How to handle the below query of "No rows returned" for the SQL? If no rows returned I would like the string "Inactive" assigned to the result.
cursor.execute("select STATUS from DOMAINTABLE")
for result in cursor:
print(result[0])
row = result.fetchone()
if row == None:
break
print ("Inactive")