Ex.
No 21: Write a Python Program Integrating MySQL with Python to Create a Table in the Existing DB
AIM:
To write a Python Program to integrate MYSQL with Python and create Table EMP to store the
details of employees.
Source Code:
Sample Output:
Result:
Thus, the above Python program has been executed and the output is verified successfully
[Link] 22 : Write a Python Program INTEGRATING MYSQL WITH PYTHON and to insert records into a
table and display the records.
AIM:
To write a Python Program to integrate MYSQL with Python by inserting records to Emp table and
display the records.
SOURCE CODE:
SAMPLE OUTPUT:
Result:
Thus, the above Python program has been executed and the output is verified successfully.
[Link] 23 : Write a Python Program INTEGRATING MYSQL WITH PYTHON to SEARCH AND DISPLAY the
RECORDS
AIM:
To write a Python Program to integrate MYSQL with Python to search an Employee using EMPID
and display the record if present in table EMP, if not display the appropriate message.
SOURCE CODE:
SAMPLE OUTPUT:
Result:
Thus, the above Python program has been executed and the output is verified successfully.
[Link] 24 : Write a Python program INTEGRATING MYSQL WITH PYTHON and to Update RECORDS in the
table
AIM:
To write a Python Program to integrate MYSQL with Python to search an Employee using EMPID
and update the Salary of an employee if present in already existing table EMP, if not display the
appropriate message.
SOURCE CODE:
SAMPLE OUTPUT:
Result:
Thus, the above Python program has been executed and the output is verified successfully.