Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

2010ÄêSQLiteѧϰ±Ê¼ÇÖ®¶þ


2010ÄêSQLiteѧϰ±Ê¼ÇÖ®¶þ
Ò».½¨Á¢Êý¾Ý¿â
sqlite3.exe test.db
 
¶þ.Ë«»÷sqlite-3_6_16Ŀ¼ÏµijÌÐòsqlite3.exe£¬¼´¿ÉÔËÐÐ
Èý.Í˳ö
.exit
»òÕß
.quit
ËÄ.SQLiteÖ§³ÖÈçÏÂ5ÖÖÊý¾ÝÀàÐÍ
1.NULL£º¿ÕÖµ¡£
2.INTEGER£º´ø·ûºÅµÄÕûÐÍ£¬¾ßÌåÈ¡¾öÓдæÈëÊý×ֵķ¶Î§´óС¡£
3.REAL£º¸¡µãÊý×Ö£¬´æ´¢Îª8-byte IEEE¸¡µãÊý¡£
4.TEXT£º×Ö·û´®Îı¾¡£
5.BLOB£º¶þ½øÖƶÔÏó¡£
 
Îå.ÁªÏµÈ˱í¸ñ½á¹¹ÈçÏÂ
create table contact(id integer primary key autoincrement,
lastname varchar(20),firstname varchar(20),
mobile varchar(30), telephone varchar(20),
email  varchar(30), company varchar(50),
department varchar(16),address varchar(80),
id1 interger,id2 integer, updatetime datetime);
 
Áù.²é¿´Êý¾Ý¿âÓÐÄÄЩÊý¾Ý±í
ÃüÁîÊÇ£º.tables
Æß.ÈçºÎ²åÈëÒ»Ìõ¼Ç¼
insert into contact(lastname,firstname,mobile,telephone,updatetime) values('Áõ','³©','13910128132','010-81749136','2009-07-22');
°Ë.²é¿´Êý¾Ý±íµÄ½á¹¹
 
 
Õë¶ÔÕû¸öÊý¾Ý¿â
.schema
Õë¶Ô½ö½öÊÇcontactÁªÏµÈ˸ñí
.schema  contact ×¢ÒâûÓзֺÅ
 
¾Å.ÈçºÎ´ò¿ªÒ»¸öÒѾ­´´½¨µÄÊý¾Ý¿â
 
sqlite3  test.db
Ê®.ÈçºÎ½â¾öÈçÏÂÎÊÌâ
SQL error: near "sqlite3": syntax error
 
SQLÖ¸ÁÊÇÒԷֺţ¨;£©½áβµÄ¡£Èç¹ûÓöµ½Á½¸ö¼õºÅ£¨--£©Ôò´ú±í×¢½â£¬sqlite3»áÂÔ¹ýÈ¥
 
ʮһ.ÈçºÎ½¨Á¢Ë÷Òý
create index index_name on table_name(field_to_be_indexed);
Ê®¶þ.ÈçºÎɾ³ýÒ»ÕÅÊý¾Ý±í
drop table contact;
 
Ê®Èý.²é¿´µ±Ç°µÄÊý¾Ý¿â
.database
 
Ê®ËÄ.ÈçºÎɾ³ýÒ»¸öÊý¾Ý±íµÄÊý¾Ý
delete from contact;
Ê®Îå.ÈçºÎµ¼ÈëÒ»¸öÎļþµ½Ä³¸ö±íÖÐ
.import  Îļþ·¾¶  ±íÃû
×¢ÒâÕâÊÇ·ÇSQLÓï¾ä£¬ËùÒÔ²»¼Ó·ÖºÅ
Ê®Áù.ÈçºÎÉèÖÃÎļþ×ֶεķָô·û
.separator   “,”
.import e:/contact.txt contact
Ê®Æß.ÈçºÎ²é¿´µ±Ç°sqllite×ֶεķָô·ûÊÇʲô£¿
.show
 
Ê®°Ë.ÈçºÎ½«²éѯ½á¹ûµ¼³öµ½Ò»¸öÎļþ
 
µÚÒ»²½£º.output a.txt
µÚ¶þ²½£ºÖ´ÐÐÒªµ¼³öµÄSQLÓï¾ä
µÚÈý²½£º.output stdout
Ê®¾Å.SQL²éѯÓï¾ä
select * from film order by year limit 10;
select * from film order by year desc limit 10;
select count(*) from film;
select * from fil


Ïà¹ØÎĵµ£º

SqliteºÍSQLCEÔÚWindows Mobile 6ÉϵÄÐÔÄܶԱÈ

     ×î½ü¹«Ë¾ÐèÒª½«×ÀÃæϵͳ²¿Êðµ½PDAÉÏÃæÈ¥£¬Ñ¡ÔñÁËWM6×÷Ϊ²¿Êðƽ̨¡£ÔÚÑ¡ÔñÊý¾Ý¿â·½Ãæ³öÏÖÁËÒ»µã¹ËÂÇ£¬ÒòΪ¶ÔÓÚPDA¶øÑÔ£¬ÐÔÄÜÊÇÊ×Òª¿¼ÂǵÄÒòËØ¡£
     ÔÚ¿ªÔ´µÄÊý¾Ý¿âSqliteºÍSQLCEÖ®¼äÅÇ»²£¬ËùÒÔÕë¶ÔÕâ¸öÇé¿ö£¬¶ÔSqliteºÍSQLCEÔÚWM6ÉÏÃæ×öÁËÐÔÄܲâÊÔ¡£ÎÒÒ²½«×Ô¼ºÔÚ×ö²âÊÔ¹ý³ÌÖÐÅöµ ......

SQLITEÊý¾Ý±íÖ÷¼üÉèÖÃId×ÔÔö·½·¨

    ¸ã¶¨ÁËÒ»¸öÀ§ÈÅÐí¾ÃµÄÎÊÌ⣬ԭÀ´sqliteÖеÄÖ÷¼üÒ²ÊÇ¿ÉÒÔÉèÖÃΪ×ÔÔöµÄ£º£©·½·¨¾ÍÊÇÉùÃ÷Ϊ INTEGER PRIMARY KEY µÄ×ֶοÉÒÔ×Ô¶¯Ôö¼Ó¡£
    ÍøÉϲ鵽×ÊÁÏ˵£¬´Ó SQLite µÄ 2.3.4 °æ±¾¿ªÊ¼£¬Èç¹û½«Ò»¸ö±íÖеÄÒ»¸ö×Ö¶ÎÉùÃ÷Ϊ INTEGER PRIMARY KEY£¬ÄÇôֻÐèÏò¸Ã±íµÄ¸Ã×ֶβåÈëÒ»¸ö NULL Öµ£¬ ......

ÊÕ¼¯Ç¶ÈëʽÊý¾Ý¿âSqliteÒÆÖ²×ÊÁÏ

sqlite-3.3.6±àÒë°²×°Óë½»²æ±àÒëÈ«¹ý³ÌÏêϸ¼Ç¼
ÏÂÎĽéÉܵÄÄÚÈݶ¼ÊÇ»ùÓÚ Linux RedHat 9.0 ƽ̨µÄ¡£
Ò»¡¢PC»ú±àÒë°²×°
ÇëÔĶÁÔÚ°²×°°üÀïµÄ INSTALL Îļþ¡£»òÕßʹÓÃPEAR installer with "pear install sqlite"¡£SQLiteÒѾ­ÄÚÖÃÁË£¬Äã²»ÐèÒª°²×°Èκθ½¼ÓµÄÈí¼þ£¨additional software£©¡£
Windows users¿ÉÒÔÏÂÔØSQLiteÀ©Õ¹ ......

SQLiteʹÓÃ

OS X×Ô´Ó10.4ºó°ÑSQLiteÕâÌ×Ï൱³öÃûµÄÊý¾Ý¿âÈí¼þ£¬·Å½øÁË×÷ҵϵͳ¹¤¾ß¼¯Àï¡£OS X°ü×°µÄÊǵÚÈý°æµÄSQLite£¬ÓÖ³ÆSQLite3¡£ÕâÌ×Èí¼þÓм¸¸öÌØÉ«£º
Èí¼þÊôÓÚ¹«¹²²Æ£¨public domain£©£¬SQLite¿É˵ÊÇijÖÖ¡¸ÃÀµÂÈí¼þ¡¹£¨virtueware£©£¬×÷Õß±¾ÈË·ÅÆú×Å×÷Ȩ£¬¶ø¸øʹÓÃSQLiteµÄÈËÒÔϵġ¸×£¸£¡¹£¨blessing£©£º
May you do good an ......

sqlite Êý¾Ý¿â¿ÉÊÓ»¯²é¿´Ð޸ķÖÎö¹¤¾ßsqlitebrowser


SQLite Database Browser
 
 
SQLite Database browser is a light GUI editor for SQLite databases, built on top of Qt. The main goal of the project is to allow non-technical users to create, modify and edit SQLite databases using a set of wizards and a spreadsheet-like interface.
Downlo ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ