PARAMETERIZED QUERIES | HOW TO TAKE INPUT FROM USER | INTERFACE PYTHON WITH MYSQL | CBSE-XII | CS

Опубликовано: 27 Февраль 2026
на канале: Prachi The Educator
115
1

#prachitheeducator
PARAMETERIZED QUERIES | HOW TO TAKE INPUT FROM USER | INTERFACE PYTHON WITH MYSQL | CBSE-XII | CS

Parameterized Query
(i) Old Style: String Templates with % formatting
f%v
Where,
f is a template string
v specifies the values to be formatted using the template. v must be a tuple.
“Select * from item where sno = %s” % (10,)

(ii) New Style : using format function
Str=“Select * from student where sid = { } and section = ‘{ }’ ”.format (20,’B’)

Dear Friends, please help this channel to grow. I will keep uploading quality python tutorial for you.
Please like, share n subscribe my channel.

Python connectivity with Mysql
   • Python Connectivity with MySQL | Interface...  

fetchone(), fetchall(), fetchmany(n), rowcount
   • Display Data by using fetchone(), fetchall...  

Playlist:
Computer Science with Python Class 12:
   • Python Tutorial for beginners | CBSE Class...  

String Data type:
   • String Data type | String Slicing | String...  

Flow Control (Conditional & Iterative Statements):
   • Conditional & Iterative Statements  

Function in Python:
   • Functions in Python | Types of functions |...  

File Handling : Text files, Binary files, CSV files
   • file handling | python file handling | cla...  

Data structure: Introduction, Stack implementation
   • Data structure : Stack (Push & Pop), Class...  

Important questions, Error based, Output based
   • Important Questions | Error finding | Outp...