We will use Python's pymysql library to work with the database. This library provides the programmer the functionality to run MySQL query using Python.
Algorithm:
- Step 1: Connect to database using connect() method in pymysql.
- Step 2: Get input of faculty ID from the user.
- Step 3: Write a query to fetch the details of the faculty and display it to the user.
- Step 4: Get user input for the tuple (filed) to be changed.
- Step 5: Get user input on the updated values and then update it.
Python program to update records in the database
Output:
need an explanation for this answer? contact us directly to get an explanation for this answer