SHARE
TWEET

Untitled

a guest Oct 17th, 2019 92 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # -*- coding: utf-8 -*-
  2. import sqlite3
  3.  
  4. con = sqlite3.connect('./sample.db')
  5. cur = con.cursor()
  6. cur.execute("SELECT fruit.name, color.color FROM fruit JOIN color ON fruit.color_id = color.color_id")
  7. for row in cur:
  8.     print("fruit.name:" + str(row[0]) + ", color.color:" + str(row[1]))
  9. con.close()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top