Home / Questions / How do you retrieve data from a query in Python using DB-API?
Explanatory Question

How do you retrieve data from a query in Python using DB-API?

👁 240 Views
📘 Detailed Answer
🕒 Easy to Read
Read the answer carefully and go through the related questions on the right side to improve your understanding of this topic.

Answer with Explanation

Answer: You can use the fetchone() or fetchall() methods of a cursor object to retrieve data from a query.