0

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

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.

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks, Bu i know for sure (Ran it on the Database) that there is a record with record_id544
Is the record_id field string or numeric? You are comparing it on the query as numeric data type.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.