You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cursor.execute('''
CREATE TABLE IF NOT EXISTS petroleum_sales (
id INTEGER PRIMARY KEY,
country TEXT,
product TEXT,
year INTEGER,
sales REAL
)
''')
# Data haldai
for entry in data:
cursor.execute('''
INSERT INTO petroleum_sales (country, product, year, sales)
VALUES (?, ?, ?, ?)
''', (entry['country'], entry['petroleum_product'], entry['year'], entry['sale']))
# Print the inserted data
print("Inserted data:", entry)
conn.commit()
print("Data successfully stored in the SQLite database.")
except sqlite3.Error as e:
print("SQLite Error:", e)
exit()
Live databases are now .. live! - DB Browser for SQLite
https://sqlitebrowser.org/blog/live-databases-are-now-live/
The text was updated successfully, but these errors were encountered: