Home | | Computer Science 12th Std | Querying A Date Column

Chapter: 12th Computer Science : Chapter 15 : Integrating Python with MySql and C++ : Data Manipulation Through SQL

Querying A Date Column

In this example we are going to display the name and grade of students who have born in the year 2001

Querying A Date Column

In this example we are going to display the name and grade of students who have born in the year 2001

Example

import sqlite3

connection = sqlite3.connect("Academy.db")

cursor = connection.cursor()

cursor.execute("SELECT Rollno,sname FROM student

WHERE(Birth_date>='2001-01-01' ANDBirth_date<='2001-12-01')")

result = cursor.fetchall()

print(*result,sep="\n")

OUTPUT

(5, 'VARUN')

 

Study Material, Lecturing Notes, Assignment, Reference, Wiki description explanation, brief detail
12th Computer Science : Chapter 15 : Integrating Python with MySql and C++ : Data Manipulation Through SQL : Querying A Date Column |


Privacy Policy, Terms and Conditions, DMCA Policy and Compliant

Copyright © 2018-2024 BrainKart.com; All Rights Reserved. Developed by Therithal info, Chennai.