Computer Science, asked by sjprasanna, 9 months ago

small python program that sends sql queries and database and display the results. show program for example ​

Answers

Answered by mohammedsuleiman046
1

Answer:

Explanation:

import sqlite3

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

cursor = connection.cursor()

cursor.execute("SELECT Site.lat, Site.long FROM Site;")

results = cursor.fetchall()

for r in results:

   print(r)

cursor.close()

connection.close()

(-49.85, -128.57)

(-47.15, -126.72)

(-48.87, -123.4)

Similar questions