Search This Blog

Wednesday, February 1, 2012

SQLite - starter kick

SQlite , its very popular Database , easy to use , i used it as InMemory db.

download software from Sqlite home page.

know your limits -> Frequently Asked Questions .

Know your Datatypes In SQLite Version 3.

Command Line Shell For SQLite.

in case you need ODBC for sqlite , you can find it here SQLite ODBC Driver.
nice tool for sqlite its the sqlite browser.
check out Sqlite wrappers you might find something for your needs.

(i used the 3.7.10 version)
command line usage example to open db

sqlite3.exe yaniv.db
sqlite> .mode column
sqlite> .headers  on
sqlite> select * from t1;


Create a new db (open cmd window)
sqlite3.exe myTest.db
sqlite> CREATE TABLE t2(t  TEXT,nu NUMERIC,i  INTEGER,r  REAL,no BLOB ,EFFEC_DATE DATE );
sqlite> INSERT INTO t2 (t,nu,i,r,no,EFFEC_DATE) VALUES('500.0', '500.0', '500.0', '500.0', '500.0','2010-10-23');
sqlite>.quit


.read excute sql file
import value into db

sqlite>.separator ,
sqlite>.import  dd.txt t2

// will show you all master objects
sqlite> SELECT * FROM sqlite_master;


enjoy 
yaniv Tzanany

No comments: