
Python 專案開發入門的十堂課
第七堂 利用 Python 標準程式庫開發程式:Python 標準程式庫的資料庫 sqlite3
重點整理
- 資料庫處理要先建立 Connection 物件,接著建立 Cursor 物件,然後進行資料庫操作,最後要關閉資料庫。
- Python 的 None 是 SQLite 的 NULL 。
- Python 的 int 是 SQLite 的 INTEGER 。
- Python 的 float 是 SQLite 的 REAL 。
- Python 的 str 是 SQLite 的 TEXT 。
- Python 的 bytes 是 SQLite 的 BLOB 。
相關文章
