Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # -*- coding: utf-8 -*-
- import sqlite3
- con = sqlite3.connect('./sample.db')
- cur = con.cursor()
- cur.execute("SELECT fruit.name, color.color FROM fruit JOIN color ON fruit.color_id = color.color_id")
- for row in cur:
- print("fruit.name:" + str(row[0]) + ", color.color:" + str(row[1]))
- con.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement