Fetchall retuning null

Viewed 26

I'm having a issue with my python code which runs sql's on oracle server and I using cx_Oracle

The current problem is that my database query is returning one record but when I use fetch all its giving null.

cursor code block:

cursor.execute(sql_command)
chk = cursor.fetchone()
if chk:
   print(chk)
   rows = cursor.fetchall()
   print(rows)
   
output:
('NAGS', 1, 0, 0, 0, 2, 0)
[]

in SQL I tried with single record and multiple records, it behaving same.

Getting results from sqldeveloper and sqlplus.

any suggestions? Thanks

0 Answers
Related