CBSE Class 12 Computer Science Question 32 of 46

Interface Python with MySQL — Question 9

Back to all questions
9
Question

Question 9

To run an SQL query from within Python, you may use <cursor>. ............... method().

  1. query()
  2. execute()
  3. run()
  4. all of these
Answer

execute()

Reason — The <cursor>.execute() method is used to run an SQL query from within Python.