0% found this document useful (0 votes)
2 views8 pages

Program 24

The document outlines a series of Python programs that integrate MySQL with Python for various operations on an Employee table, including inserting, searching, and updating records. Each section includes an aim, source code, and confirms successful execution with sample outputs. The document serves as a guide for implementing basic database operations using Python and MySQL.

Uploaded by

vvakeshmidhun
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views8 pages

Program 24

The document outlines a series of Python programs that integrate MySQL with Python for various operations on an Employee table, including inserting, searching, and updating records. Each section includes an aim, source code, and confirms successful execution with sample outputs. The document serves as a guide for implementing basic database operations using Python and MySQL.

Uploaded by

vvakeshmidhun
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Python-MySQL

Interface
[Link]: 24(1)
(1)

CREATING A PYTHON PROGRAM TO INTEGRATE MYSQL WITH PYTHON


(INSERTING RECORDS AND DISPLAYING RECORDS)

AIM:
To write a Python Program to integrate MYSQL with Python by inserting records to
Emp table and display the records.

SOURCE CODE:

Result:
Thus, the above Python program is executed successfully and the output is verified.
SAMPLE OUTPUT:

Python Executed Program Output:

SQL OUTPUT:
[Link]: 24(2)

(2)
CREATING A PYTHON PROGRAM TO INTEGRATE MYSQL WITH PYTHON
(SEARCHING AND DISPLAYING 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 already existing table EMP, if not
display the appropriate message.

SOURCE CODE:

Result:

Thus, the above Python program is executed successfully and the output is verified.
SAMPLE OUTPUT:

Python Executed Program Output:

RUN -1:

Run – 2:

SQL OUTPUT:

OUTPUT -1:

OUTPUT -2:
Exp:24
(3)

(UPDATING RECORDS)
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:

Result:
Thus, the above Python program is executed successfully and the output is verified.
SAMPLE OUTPUT:

Python Executed Program

Output: RUN -1:

Run -2:

SQL OUTPUT:

You might also like