Vous êtes sur la page 1sur 3

Sqlite3 Quick Reference Guide - TechMajik

Pgina 1

TechMajik |
Home About Mail RSS Toggle posts A A+ A++ Categories Dijango MySQLDB Eclipse Excel HTML HTML Tags JAVA JAVA Calendar JAVA Programming Liferay Ruby on Rails sqlite3 Uncategorized Blogroll Development Blog Documentation Plugins Suggest Ideas Support Forum Themes WordPress Planet Meta Log in RSS Comments RSS Sep/10 26

Sqlite3 Quick Reference Guide


1 Comment | Posted by admin in sqlite3 Sqlit3 is very quick and easy to setup. This article was written based on latest version of Sqlite3 sqlite-3_7_2.zip. Please check www.sqlite.com for latest verison. 1. 2. 3. 4. Download sqlit3 from http://www.sqlite.org/download.html page. Unzip sqlite3 into any folder. You will see sqlite3.exe extracted. Double click on sqlite3.exe. You will see sqlite> DOS prompt.

Lets create some database, create a table and load data from a text file. 1. 2. 3. 4. Launch Windows command line utility cmd.exe. Execute command sqlite3 mydatabase Create personal information table as shown below. sqlite> create table personalinfo ( > ID integer primary key, > first_name varchar(50) NOT NULL, 05/04/2013 13:07:30

http://techmajik.com/2010/09/26/sqlite3-quick-reference-guide/

Sqlite3 Quick Reference Guide - TechMajik > last_name varchar(50) NOT NULL, > birthdate date NOT NULL, > email varchar(80) NOT NULL > ); 5. Build test data seprated by a tab \t key. Here is two records separated by a tab key. Save this into a personalinfo.txt file. 1 first_test last_test 1978-10-01 first@techmajik.com 2 first_second last_second 1978-10-02 second@techmajik.com 1. 2. 3. 4. 5. Now, load data into personalinfo table Set a field seperator. sqlite> .separator \t sqlite> .import personalinfo.txt personalinfo sqlite> select * from personalinfo; You should see same data.

Pgina 2

sqlite3

1 Comment for Sqlite3 Quick Reference Guide

Martin | November 8, 2012 at 5:01 am With SQLite V 3.5.6, the table creation synatx is:CREATE TABLE stories (id int(11) NOT NULL,name varchar(255) default NULL,link varchar(255) default NULL,created_at datetime DEFAULT NULL,updated_at datetime DEFAULT NULL,PRIMARY KEY (id));The PRIMARY KEY (id) automatically makes it autoincrement

Leave a comment!
Name* Mail* (will not be published) Website Comment

Submit Comment

<< How to use ArrayList in Java How to enable Developer tab in EXCEL? >> Find it!
Search... Go

Theme Design by devolux.org Tag Cloud


ArrayList

Eclipse Excel JAVA

Liferay MACRO Rails Ruby Ruby on Rails SQL sqlite3 SQL Server subList Wordpress

Archives February 2013 January 2013 May 2012 September 2010 May 2010 April 2010 February 2010 January 2010

http://techmajik.com/2010/09/26/sqlite3-quick-reference-guide/

05/04/2013 13:07:30

Sqlite3 Quick Reference Guide - TechMajik To top

Pgina 3

http://techmajik.com/2010/09/26/sqlite3-quick-reference-guide/

05/04/2013 13:07:30

Vous aimerez peut-être aussi