Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
2 views
3 pages
SQL RELATED PROGRAMS
programs
Uploaded by
sasi
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
Download now
Download
Save SQL RELATED PROGRAMS For Later
Download
Save
Save SQL RELATED PROGRAMS For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
2 views
3 pages
SQL RELATED PROGRAMS
programs
Uploaded by
sasi
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
Download now
Download
Save SQL RELATED PROGRAMS For Later
Carousel Previous
Carousel Next
Download
Save
Save SQL RELATED PROGRAMS For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 3
Search
Fullscreen
SQL RELATED PROGRAMS
1) Display record whose name start with particular character
import mysql.connector
mydb=mysql.connector.connect(host="localhost",user="root",database='result',
passwd="Sasi@2023",auth_plugin="mysql_native_password")
cursor=mydb.cursor()
s='SELECT * FROM mark1 where STUD_NAME like "s%"'
print("MARK1 TABLE")
cursor.execute(s)
print(cursor.fetchall())
s1='SELECT * from mark1 where STUD_NAME like "_H%"'
print("MARK1 TABLE")
cursor.execute(s1)
print(cursor.fetchall())
__________________________________________________________________________________
2) update mark of particular student
import mysql.connector
mydb=mysql.connector.connect(host="localhost",user="root",database='result',
passwd="Sasi@2023",auth_plugin="mysql_native_password")
cursor=mydb.cursor()
s='update mark1 set MARK=MARK+5 where STUD_NAME="SHALINI"'
cursor.execute(s)
mydb.commit()
print("MARK1 TABLE")
s1='select * from mark1'
cursor.execute(s1)
print(cursor.fetchall())
3) inserting records into table
import mysql.connector
mydb=mysql.connector.connect(host="localhost",user="root",database='result',
passwd="Sasi@2023",auth_plugin="mysql_native_password")
cursor=mydb.cursor()
sql='INSERT INTO mark1 values(12001,"SHYAM",98.23),
(12002,"ABISHEK",87.56),(12003,"SRI",90.67),(12004,"SHALINI",85.98),
(12005,"VISHAL",78.87)'
cursor.execute(sql)
mydb.commit()
s='SELECT * FROM mark1'
print("MARK1 TABLE")
cursor.execute(s)
print(cursor.fetchall())
__________________________________________________________________________________
4) sorting records
import mysql.connector
mydb=mysql.connector.connect(host="localhost",user="root",database='result',
passwd="Sasi@2023",auth_plugin="mysql_native_password")
cursor=mydb.cursor()
s='SELECT * FROM mark1 order by STUD_NAME'
print("MARK1 TABLE")
cursor.execute(s)
print(cursor.fetchall())
s1='SELECT * from mark1 order by MARK DESC'
print("MARK1 TABLE")
cursor.execute(s1)
print(cursor.fetchall())
__________________________________________________________________________________
5) display student record whose mark greater than 90
import mysql.connector
mydb=mysql.connector.connect(host="localhost",user="root",database='result',
passwd="Sasi@2023",auth_plugin="mysql_native_password")
cursor=mydb.cursor()
s='SELECT * FROM mark1 where MARK>90'
print("MARK1 TABLE")
cursor.execute(s)
print(cursor.fetchall())
________________________________________________________________________________
6) display selected column
import mysql.connector
mydb=mysql.connector.connect(host="localhost",user="root",database='result',
passwd="Sasi@2023",auth_plugin="mysql_native_password")
cursor=mydb.cursor()
s='SELECT REGNO,MARK FROM mark1'
print("MARK1 TABLE")
cursor.execute(s)
print(cursor.fetchall())
7) create database
import mysql.connector
mydb=mysql.connector.connect(host="localhost",user="root",passwd="Sasi@20
23",auth_plugin="mysql_native_password")
cursor=mydb.cursor()
sql='create database result1'
cursor.execute(sql)
s='show databases'
print("ALL DATABASES")
cursor.execute(s)
print(cursor.fetchall())
You might also like
DBMS Lab Manual BCS403
PDF
100% (1)
DBMS Lab Manual BCS403
42 pages
Python MQL Connectivity Programs
PDF
67% (3)
Python MQL Connectivity Programs
8 pages
DBMS Exam
PDF
100% (1)
DBMS Exam
44 pages
High Performance Techniques For Microsoft SQL Server
PDF
No ratings yet
High Performance Techniques For Microsoft SQL Server
307 pages
XII Practical File (SQL)
PDF
No ratings yet
XII Practical File (SQL)
15 pages
Database Programs
PDF
No ratings yet
Database Programs
5 pages
All Command For MySQL Connector
PDF
No ratings yet
All Command For MySQL Connector
6 pages
681559577-PYTHON-MQL-CONNECTIVITY-PROGRAMS
PDF
No ratings yet
681559577-PYTHON-MQL-CONNECTIVITY-PROGRAMS
8 pages
Cs Pracfile12
PDF
No ratings yet
Cs Pracfile12
14 pages
SQL- Notes
PDF
No ratings yet
SQL- Notes
21 pages
Use of Database 24-41
PDF
No ratings yet
Use of Database 24-41
21 pages
Cs Record SQL
PDF
No ratings yet
Cs Record SQL
16 pages
Python + MySql Connectivity
PDF
No ratings yet
Python + MySql Connectivity
4 pages
ML SQL Programs
PDF
No ratings yet
ML SQL Programs
9 pages
Prac 3
PDF
No ratings yet
Prac 3
4 pages
Query Formatting
PDF
No ratings yet
Query Formatting
13 pages
XII CS CH 16 Interface Python With MySQL
PDF
No ratings yet
XII CS CH 16 Interface Python With MySQL
22 pages
Exp 30
PDF
No ratings yet
Exp 30
5 pages
Practical 10
PDF
No ratings yet
Practical 10
5 pages
Annual-Project
PDF
No ratings yet
Annual-Project
5 pages
Inteface Python With Mysql
PDF
No ratings yet
Inteface Python With Mysql
4 pages
12-IP DB Interface code
PDF
No ratings yet
12-IP DB Interface code
5 pages
PROGRAMMS-11-split-merge
PDF
No ratings yet
PROGRAMMS-11-split-merge
20 pages
SAMPLE CS PROJECT - STUDENT DATA MANAGEMENT SYSTEM
PDF
No ratings yet
SAMPLE CS PROJECT - STUDENT DATA MANAGEMENT SYSTEM
17 pages
unit 5 python
PDF
No ratings yet
unit 5 python
12 pages
SOURCE CODE (cs)
PDF
No ratings yet
SOURCE CODE (cs)
4 pages
MySQL Connectivity ShortNotes
PDF
No ratings yet
MySQL Connectivity ShortNotes
7 pages
CS Phyton-SQL Connectivity
PDF
No ratings yet
CS Phyton-SQL Connectivity
10 pages
SQL Connecting
PDF
No ratings yet
SQL Connecting
8 pages
Interfacing Python With MySql
PDF
No ratings yet
Interfacing Python With MySql
3 pages
MySQL Connectvity Assignment
PDF
No ratings yet
MySQL Connectvity Assignment
2 pages
688275491-Student-Management-EDITED_removed (2)
PDF
No ratings yet
688275491-Student-Management-EDITED_removed (2)
13 pages
XII Student Management Project
PDF
No ratings yet
XII Student Management Project
25 pages
SCHOOL_MANAGEMENT_SYSTEM_TEXT
PDF
No ratings yet
SCHOOL_MANAGEMENT_SYSTEM_TEXT
4 pages
Interface Python with MySQL1
PDF
No ratings yet
Interface Python with MySQL1
12 pages
ML PGM
PDF
No ratings yet
ML PGM
8 pages
Python Exp8 60004210231
PDF
No ratings yet
Python Exp8 60004210231
9 pages
K C International School
PDF
No ratings yet
K C International School
28 pages
Interface Python With SQL
PDF
No ratings yet
Interface Python With SQL
5 pages
Interface 2
PDF
No ratings yet
Interface 2
18 pages
Python connecting to Mysql Database (1)
PDF
No ratings yet
Python connecting to Mysql Database (1)
6 pages
CONNECTIVITY BETWEEN PYTHON AND MYSQL (1)
PDF
No ratings yet
CONNECTIVITY BETWEEN PYTHON AND MYSQL (1)
14 pages
8. STUDENT MANAGEMENT SOURCE CODE
PDF
No ratings yet
8. STUDENT MANAGEMENT SOURCE CODE
11 pages
4th module python
PDF
No ratings yet
4th module python
33 pages
newww
PDF
No ratings yet
newww
13 pages
STUDENT REGISTRATION SYSTEM
PDF
No ratings yet
STUDENT REGISTRATION SYSTEM
19 pages
Aissce 2024 Xii
PDF
No ratings yet
Aissce 2024 Xii
2 pages
dbms_exp_9[1]
PDF
No ratings yet
dbms_exp_9[1]
5 pages
SQL Python Interconnection
PDF
No ratings yet
SQL Python Interconnection
5 pages
codingssssssssssss
PDF
No ratings yet
codingssssssssssss
4 pages
SQL Interface to Study.docx
PDF
No ratings yet
SQL Interface to Study.docx
2 pages
Mysql Queries For 2 Tables Practical
PDF
No ratings yet
Mysql Queries For 2 Tables Practical
4 pages
Aim: To Write A Python Program To Create A CSV File Student With Fields Studentid, Student Name and Score. Source Code
PDF
No ratings yet
Aim: To Write A Python Program To Create A CSV File Student With Fields Studentid, Student Name and Score. Source Code
16 pages
Lab Assignment 5
PDF
No ratings yet
Lab Assignment 5
17 pages
Notes-Ch-10-Interface Python With Mysql
PDF
No ratings yet
Notes-Ch-10-Interface Python With Mysql
3 pages
Python Database
PDF
No ratings yet
Python Database
7 pages
DataBase Progs
PDF
No ratings yet
DataBase Progs
4 pages
Python Interface - with mysql connector
PDF
No ratings yet
Python Interface - with mysql connector
15 pages
pythonmysqlnew
PDF
No ratings yet
pythonmysqlnew
7 pages
Dbconnectivity
PDF
No ratings yet
Dbconnectivity
7 pages
interface with python
PDF
No ratings yet
interface with python
6 pages
DBMS Lab Manual
From Everand
DBMS Lab Manual
Jitendra Patel
1.5/5 (3)
Basic DBA Query v.1: Oracle Database
From Everand
Basic DBA Query v.1: Oracle Database
Oraclesql-plsql
5/5 (1)
nosql-databases
PDF
No ratings yet
nosql-databases
379 pages
Oracle
PDF
No ratings yet
Oracle
11 pages
2023-2024 CSC Project Common Page
PDF
No ratings yet
2023-2024 CSC Project Common Page
18 pages
FINAL Revised Mapping - Unified Patents - Winning Submission For US7885981 - MPK - 12.01.2020
PDF
No ratings yet
FINAL Revised Mapping - Unified Patents - Winning Submission For US7885981 - MPK - 12.01.2020
47 pages
Python Manual
PDF
No ratings yet
Python Manual
53 pages
Shailendra Kumar PROJECT FILE
PDF
No ratings yet
Shailendra Kumar PROJECT FILE
35 pages
Top 10 Tricks For Delphi
PDF
0% (1)
Top 10 Tricks For Delphi
23 pages
Namma Kalvi 12th Computer Science Unit 5 Sura Guide em
PDF
No ratings yet
Namma Kalvi 12th Computer Science Unit 5 Sura Guide em
16 pages
What Is Oracle Financials
PDF
No ratings yet
What Is Oracle Financials
262 pages
PLSQL Cursor
PDF
No ratings yet
PLSQL Cursor
2 pages
Second Semester
PDF
No ratings yet
Second Semester
36 pages
G12 - Computer Science - Lab Programs 1 To 20
PDF
No ratings yet
G12 - Computer Science - Lab Programs 1 To 20
19 pages
Genetic Algorithim
PDF
No ratings yet
Genetic Algorithim
5 pages
DV 210220053508
PDF
No ratings yet
DV 210220053508
30 pages
PLSQL SQL Interviews Questions
PDF
No ratings yet
PLSQL SQL Interviews Questions
89 pages
Fundamentals - of - Relational - Database - Management - Systems QUIZ
PDF
No ratings yet
Fundamentals - of - Relational - Database - Management - Systems QUIZ
51 pages
PLSQL For Beginners Workbook
PDF
100% (2)
PLSQL For Beginners Workbook
48 pages
Fragmentation of Database Term Paper
PDF
No ratings yet
Fragmentation of Database Term Paper
16 pages
PLSQL
PDF
No ratings yet
PLSQL
55 pages
Unit VI solution
PDF
No ratings yet
Unit VI solution
7 pages
Informix Guide To SQL-Tutorial
PDF
No ratings yet
Informix Guide To SQL-Tutorial
526 pages
SQL Interview
PDF
No ratings yet
SQL Interview
62 pages
Advanced Power Builder
PDF
No ratings yet
Advanced Power Builder
266 pages
Database Management Systems Theory (4th Sem) .
PDF
No ratings yet
Database Management Systems Theory (4th Sem) .
25 pages
CS EXERCISES Grade-12 Printout
PDF
No ratings yet
CS EXERCISES Grade-12 Printout
41 pages
SQL Codes
PDF
No ratings yet
SQL Codes
23 pages
Python Manual
PDF
No ratings yet
Python Manual
45 pages