0% found this document useful (0 votes)
11 views4 pages

SQL Python Connector

The document contains a series of questions related to using a Python connector for SQL, specifically focusing on searching student records by roll number, searching based on multiple conditions, inserting multiple records, and viewing the modified structure of a student table. Each question is followed by a placeholder for an answer or code. The document serves as a guide for implementing these database operations using Python.

Uploaded by

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

SQL Python Connector

The document contains a series of questions related to using a Python connector for SQL, specifically focusing on searching student records by roll number, searching based on multiple conditions, inserting multiple records, and viewing the modified structure of a student table. Each question is followed by a placeholder for an answer or code. The document serves as a guide for implementing these database operations using Python.

Uploaded by

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

SQL PYTHON CONNECTOR

1. Question
Search a record at run-time by concatenating variable
with query.
Enter the roll number to search a student record from
the database and display the details if found, otherwise
display an appropriate message.
ANS=
2. Question:
Write a Python program to search student records
from a MySQL database based on multiple conditions
using string template with {} and format().
ANS=
3. To insert multiple records into the table student
through Python interface.
#To insert a new record into table student in MySQL
using Python Interface
ANS=
4. Question:
Write a Python script to view the modified structure of
the student table using Python MySQL Interface.
Code:

output

You might also like