I am experiencing a very strange case :
When running this query
c.execute ('select * from banks_row_data where Record_id=544')
test=c.fetchall()
The result is None
while when running :
c.execute ('select * from banks_row_data')
test=c.fetchall()
The result is the entire table
What am i doing wrong?
Thanks
1 Answer 1
On the first query you are restricting the results to only record(s) that have Record_Id = 544 but no record(s) with that Id number are stored at this time.
Your second query is not filtering results as the first query does with the WHERE clause, so basically the second query is bringing as result all existent records on that table.
answered Sep 24, 2017 at 15:24
Alberto Morillo
15.8k3 gold badges29 silver badges32 bronze badges
Sign up to request clarification or add additional context in comments.
2 Comments
Db Admin
Thanks, Bu i know for sure (Ran it on the Database) that there is a record with record_id544
Alberto Morillo
Is the record_id field string or numeric? You are comparing it on the query as numeric data type.
Explore related questions
See similar questions with these tags.
lang-py