這是歷史版本頁面 — 看 SQLite (64-bit) 最新版本
SQLite 64位是什麼?輕量資料庫怎麼用
寫個小工具或網站,需要把資料存下來,但想到要裝 MySQL 或 SQL Server 就頭痛——安裝程式好幾百 MB,設定服務、開 port、設帳號密碼,光前置作業就耗掉半天。你只是想讓程式把資料寫進檔案、之後能查得出來,不想為此養一台資料庫伺服器。
用 Excel 或 CSV 檔存資料,一開始很直覺,但資料一多、要跨表格比對或做條件篩選時,就開始卡。這類工具的切入點是「嵌入式資料庫」:不需要獨立伺服器,資料全部存在單一檔案裡,程式直接讀寫這個檔案,零設定、免安裝、離線可用。你要的只是把 SQL 查詢能力帶進你的應用程式,而不是管理一套資料庫系統。
01SQLite 64位能做什麼?
它是一個嵌入式資料庫引擎,不需要獨立伺服器,資料存在單一檔案中。你可以用 SQL 指令建立資料庫、建立表格、插入資料、查詢資料,支援大部分 SQL 標準,包括子查詢、JOIN 和觸發器。適合應用程式的本地儲存、行動裝置和嵌入式系統,例如桌面軟體的設定檔、遊戲存檔、分析工具的暫存資料。
02怎麼建立資料庫和表格?
下載 ZIP 檔解壓縮後,執行 sqlite3.exe,輸入 `sqlite3 database_name.db` 就會建立一個新的資料庫檔案。建立表格用 `CREATE TABLE users (id INTEGER PRIMARY KEY, name TEXT);`,插入資料用 `INSERT INTO users (name) VALUES ('John Doe');`,查詢用 `SELECT * FROM users;`。整個過程不需要任何設定。
03支援哪些 SQL 功能?
支援大部分 SQL 標準,包括子查詢、JOIN、觸發器,也具備完整的 ACID 交易保證,確保資料完整性。資料庫最大可達 281TB,但實際效能會依硬體和查詢複雜度而異。官方文件相當完整,語法與其他關聯式資料庫類似,學過 SQL 的人可以很快上手。
04資料庫檔案可以多大?
官方說明指出最大可達 281TB,但效能會隨資料量增加而下降。對一般應用程式的本地儲存來說,幾 GB 到幾十 GB 都還算常見使用範圍。如果資料量極大且查詢複雜,效能衰減會很明顯,這套軟體不是為超大規模資料設計的。
05怎麼匯出資料?
在 sqlite3 命令列中,先輸入 `.mode csv` 設定輸出格式,再輸入 `.output file.csv` 指定輸出檔案,最後執行 `SELECT * FROM users;`,查詢結果就會寫入 CSV 檔案。要回到螢幕輸出時,輸入 `.output stdout` 即可。這是內建功能,不需要額外工具。
06需要安裝嗎?
不需要。下載 ZIP 檔後解壓縮到任意資料夾就能執行,也可以把資料夾加入系統的 PATH 環境變數,方便從任何位置呼叫 sqlite3.exe。整個過程完全離線運作,不需要網路連線,也沒有任何背景服務或常駐程式。
07免費嗎?
是,SQLite 採用公共領域授權,完全免費,任何人可以無限制使用,包含商業用途。不過,如果你需要加密功能,官方提供的 SQLite Encryption Extension(SEE)需要付費授權;另一個選擇是開源的 SQLCipher,但這不在官方預設支援範圍內,需要自行整合。
08多人同時使用適合嗎?
不適合。SQLite 設計用於本地儲存,雖然支援多個連線,但不是為高流量並發環境最佳化。多人同時寫入時可能遇到鎖定問題,官方說明也明確指出它不適合高並發環境。如果你的應用需要多人同時讀寫,應該考慮 MySQL 或 PostgreSQL 這類完整 RDBMS。
09有圖形介面嗎?
SQLite 本身沒有圖形介面,只有命令列工具。官方說明提到可以搭配第三方 GUI 工具,例如 DB Browser for SQLite 或 SQLiteStudio,這些工具提供圖形化的資料庫結構檢視,方便瀏覽表格、執行查詢、匯入匯出資料。如果你習慣視覺化操作,需要另外下載這些工具。
10需要使用者管理嗎?
不需要,SQLite 沒有內建認證或使用者管理功能。資料庫就是一個檔案,任何能存取該檔案的人都能讀寫全部內容。如果你的應用需要區分使用者權限,必須在應用層自行實作,或改用有內建帳號管理的資料庫系統。這對單機應用不是問題,但對多人共享的環境就是限制。
11資料量很大適合嗎?
不適合。官方說明指出,資料量很大時效能會下降,而且不適合大規模多使用者應用。它擅長的是單一使用者或嵌入式場景,例如應用程式本地儲存、行動裝置、小型工具。如果你的資料預期會成長到數十 GB 以上,或需要多人同時查詢,應該評估其他資料庫方案。
下載與官方連結
sqlite-dll-win64-x64-3340000.zip · 819.2 KB · 連結指向軟體原廠
版本紀錄
- 2026-10-17 SQLite 3.54.1 (64-bit) 1.4 MB
- 2026-10-11 SQLite 3.54.0 (64-bit) 1.4 MB
- 2026-07-25 SQLite 3.53.4 (64-bit) 1.3 MB
再看 5 筆
- 2026-06-29 SQLite 3.53.3 (64-bit) 1.3 MB
- 2026-06-05 SQLite 3.53.2 (64-bit) 1.3 MB
- 2026-05-06 SQLite 3.53.1 (64-bit) 1.3 MB
- 2026-04-10 SQLite 3.53.0 (64-bit) 1.3 MB
- 2026-03-07 SQLite 3.52.0 (64-bit) 1.3 MB
這一版改了什麼
What's new in this version:
- Added the sqlite3_txn_state() interface for reporting on the current transaction state of the database connection
- Enhance recursive common table expressions to support two or more recursive terms as is done by SQL Server, since this helps make queries against graphs easier to write and faster to execute
- Improved error messages on CHECK constraint failures
CLI enhancements:
- The .read dot-command now accepts a pipeline in addition to a filename
- Added options --data-only and --nosys to the .dump dot-command
- Added the --nosys option to the .schema dot-command
- Table name quoting works correctly for the .import dot-command
- The generate_series(START,END,STEP) table-valued function extension is now built into the CLI
- The .databases dot-command now show the status of each database file as determined by sqlite3_db_readonly() and sqlite3_txn_state()
- Added the --tabs command-line option that sets .mode tabs
- The --init option reports an error if the file named as its argument cannot be opened. The --init option also now honors the --bail option
Query planner improvements:
- Improved estimates for the cost of running a DISTINCT operator
- When doing an UPDATE or DELETE using a multi-column index where only a few of the earlier columns of the index are useful for the index lookup, postpone doing the main table seek until after all WHERE clause constraints have been evaluated, in case those constraints can be covered by unused later terms of the index, thus avoiding unnecessary main table seeks
- The new OP_SeekScan opcode is used to improve performance of multi-column index look-ups when later columns are constrained by an IN operator
- The BEGIN IMMEDIATE and BEGIN EXCLUSIVE commands now work even if one or more attached database files are read-only
- Enhanced FTS5 to support trigram indexes
- Improved performance of WAL mode locking primitives in cases where there are hundreds of connections all accessing the same database file at once
- Enhanced the carray() table-valued function to include a single-argument form that is bound using the auxiliary sqlite3_carray_bind() interface
- The substr() SQL function can now also be called "substring()" for compatibility with SQL Server
The syntax diagrams are now implemented as Pikchr scripts and rendered as SVG for improved legibility and ease of maintenance