SQLite3 설치

Ubuntu:

sudo apt-get install sqlite3 libsqlite3-dev

Windows:

다운로드: http://www.sqlite.org/download.html

  1. 위 다운로드 페이지에서 Precompiled Binaries for Windows 항목으로 가서 다음 파일을 다운받는다:

    sqlite-shell-win32-x86-3080500.zip

  2. 원하는 위치에 저장한다. 안드로이드 개발환경이 구축된 경우 기본적으로 다음의 경로에 설치되어 있다:

    C:\Program Files (x86)\Android\android-sdk\tools

  3. 환경변수 Path 값에 안드로이드 sdk platform-tools 폴더와 tools 폴더의 경로를 추가한다:

    C:\Program Files (x86)\Android\android-sdk\platform-tools;C:\Program Files (x86)\Android\android-sdk\tools;



SQLite3 DB 사용하기

SQLite3 DB 파일(예, abc.db)이 존재하는 경로로 이동한 뒤 다음의 코드를 수행한다.

$ ls
abc.db
$ sqlite3
SQLite version 3.8.2 2013-12-06 14:53:30
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> .open abc.db
sqlite> .tables
table1
sqlite> select * from table1
...
sqlite> .quit
$



SQLite Browser 설치

Ubuntu:

sudo apt-get install sqlitebrowser



References