November 2018
Beginner
304 pages
7h 35m
English
To pull the data from an SQLite DB, you just use the SQL commands that tell the DB what information you want and how you want it formatted. If the data retrieval is part of the same SQLite program, that is, if the creation of the database and subsequent retrieval are in the same file, then you don't need to include it again; just make sure you haven't closed the cursor connection until the end. Otherwise, you will have to create a connection to the desired DB and recreate the cursor within the new file.
The code listing here modifies the previous code to demonstrate data retrieval:
# db_retrieval.py1 import sqlite32 3 connection = sqlite3.connect("Tools.db")4 cursor = connection.cursor()5 6 cursor.execute("SELECT ...Read now
Unlock full access