Python Database Programming Using SQLite, Explained With Examples in Malayalam Part-1

Опубликовано: 24 Март 2026
на канале: IT MALAYALAM CLASSROOM
1,056
16

Python Database Programming With SQLite Example:
import sqlite3
conn = sqlite3.connect("mydatabase.db")
sql = "create table books(id int not null primary key, title varchar(25) not null, price real not null)"
#conn.execute(sql)
conn.execute("insert into books(id,title,price) values(1,'Wings of Fire',200)")
conn.execute("insert into books(id,title,price) values(2,'Two States',300)")
conn.execute("insert into books(id,title,price) values(3,'God of Small Things',400)")
cursor = conn.execute("select * from books")
for row in cursor:
print(row[0],row[1],row[2])
conn.close()

#python #databaseprogramming #pythontutorial