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

Qt£ºSQLite 3ÈëÃŽ̳Ì


OS X×Ô´Ó10.4ºó°ÑSQLiteÕâÌ×Ï൱³öÃûµÄÊý¾Ý¿âÈí¼þ£¬·Å½øÁË×÷ҵϵͳ¹¤¾ß¼¯Àï¡£OS X°ü×°µÄÊǵÚÈý°æµÄSQLite£¬ÓÖ³ÆSQLite3¡£ÕâÌ×Èí¼þÓм¸¸öÌØÉ«£º
Èí¼þÊôÓÚ¹«¹²²Æ£¨public domain£©£¬SQLite¿É˵ÊÇijÖÖ¡¸ÃÀµÂÈí¼þ¡¹£¨virtueware£©£¬×÷Õß±¾ÈË·ÅÆú×Å×÷Ȩ£¬¶ø¸øʹÓÃSQLiteµÄÈËÒÔϵġ¸×£¸£¡¹£¨blessing£©£º
May you do good and not evil. Ô¸ÄãÐÐÉÆĪÐжñ
May you find forgiveness for yourself and forgive others. Ô¸ÄãÔ­ÁÂ×Ô¼º¿íË¡ËûÈË
May you share freely, never taking more than you give. Ô¸Äã¿íÐÄÓëÈË·ÖÏí£¬ËùÈ¡²»¶àÓÚÄãËùÊ©Óè
Ö§Ô®´ó¶àÊýµÄSQLÖ¸ÁÏÂÃæ»á¼òµ¥½éÉÜ£©¡£
Ò»¸öµµ°¸¾ÍÊÇÒ»¸öÊý¾Ý¿â¡£²»ÐèÒª°²×°Êý¾Ý¿â·þÎñÆ÷Èí¼þ¡£
ÍêÕûµÄUnicodeÖ§Ô®£¨Òò´ËûÓпçÓïϵµÄÎÊÌ⣩¡£
ËٶȺܿ졣
Ä¿
Ç°ÔÚOS X
10.4ÀSQLiteÊÇÒÔ/usr/bin/sqlite3µÄÐÎʽ°ü×°£¬Ò²¾Í˵ÕâÊÇÒ»¸öÃüÁîÁй¤¾ß£¬±ØÐëÏÈ´ÓÖն˻ú£¨Terminal.app»òÆäËû
³ÌÐò£©½øÈëshellÖ®ºó²ÅÄÜʹÓá£ÍøÂçÉÏÓÐһЩϢЭÖúʹÓÃSQLiteµÄÊÓ¾õ»¯¹¤¾ß£¬µ«Ëƺõ¶¼Ã»ÓÐÏñCocoaMySQL£¨ÅäºÏMySQLÊý¾Ý¿âʹÓã©
ÄÇ°ãºÃÓ᣻òÐíËæʱÓоªÏ²Ò²Î´¿ÉÖª£¬ÒÔϽö½éÉÜÃüÁîÁеIJÙ×÷·½Ê½¡£
SQLite¹ËÃû˼ÒéÊÇÒÔSQLΪ»ù´¡µÄÊý¾Ý¿âÈí¼þ£¬SQLÊÇÒ»Ì×Ç¿´óµÄ
Êý¾Ý¿âÓïÑÔ£¬Ö÷Òª¸ÅÄîÊÇÓÉ¡¸Êý¾Ý¿â¡¹¡¢¡¸×ÊÁÏ±í¡¹£¨table£©¡¢¡¸²éѯָÁ£¨queries£©µÈµ¥Ôª×é³ÉµÄ¡¸¹ØÁªÐÔÊý¾Ý¿â¡¹£¨½øÒ»²½µÄ¸ÅÄî¿É²Î¿¼ÍøÂç
Éϸ÷ÖÖ¹ØÓÚSQL¼°¹ØÁªÐÔÊý¾Ý¿âµÄÎļþ£©¡£ÒòΪSQLµÄ²éѯ¹¦ÄÜÇ¿´ó£¬Óï·¨Ò»Ö¶øÈëÃÅÈÝÒ×£¬Òò´Ë³ÉΪÏÖ½ñÖ÷Á÷Êý¾Ý¿âµÄ±ê×¼ÓïÑÔ£¨Î¢Èí¡¢OracleµÈ´ó³§
µÄÊý¾Ý¿âÈí¼þ¶¼ÌṩSQLÓï·¨µÄ²éѯ¼°²Ù×÷£©¡£
ÒÔÏÂÎÒÃǾͽ¨Á¢Êý¾Ý¿â¡¢½¨Á¢×ÊÁÏ±í¼°Ë÷Òý¡¢ÐÂÔö×ÊÁÏ¡¢²éѯ×ÊÁÏ¡¢¸ü¸Ä×ÊÁÏ¡¢ÒƳý×ÊÁÏ¡¢sqlite3ÃüÁîÁÐÑ¡ÏîµÈ¼¸¸öÏîÄ¿×ö¼òµ¥µÄ½éÉÜ¡£
Ŀ¼
1
 ½¨Á¢Êý¾Ý¿âµµ°¸
2
 ÔÚsqlite3ÌáʾÁÐϲÙ×÷
3
 SQLµÄÖ¸Áî¸ñʽ
4
 ½¨Á¢×ÊÁϱí
5
 ½¨Á¢Ë÷Òý
6
 ¼ÓÈëÒ»±Ê×ÊÁÏ
7
 ²éѯ×ÊÁÏ
8
 ÈçºÎ¸ü¸Ä»òɾ³ý×ÊÁÏ
9
 ÆäËûsqliteµÄÌرðÓ÷¨
10
 Ð¡½á
½¨Á¢Êý¾Ý¿âµµ°¸
ÓÃsqlite3½¨Á¢Êý¾Ý¿âµÄ·½·¨ºÜ¼òµ¥£¬Ö»ÒªÔÚshellϼüÈ루ÒÔÏÂ$·ûºÅΪshellÌáʾºÅ£¬ÇëÎð¼üÈ룩£º
$ sqlite3 foo.db
Èç¹ûĿ¼ÏÂûÓÐfoo.db£¬sqlite3¾Í»á½¨Á¢Õâ¸öÊý¾Ý¿â¡£sqlite3²¢Ã»ÓÐÇ¿ÖÆÊý¾Ý¿âµµÃûÒªÔõôȡ£¬Òò´ËÈç¹ûÄãϲ»¶£¬Ò²¿ÉÒÔÈ¡¸öÀýÈçfoo.icannameitwhateverilikeµÄµµÃû¡£
ÔÚsqlite3ÌáʾÁÐϲÙ×÷
½øÈë


Ïà¹ØÎĵµ£º

QtopiaÖÐʹÓÃSQLite×ܽἰSQLiteÖд洢ÖÐÎIJÙ×÷

¡¾¹¤×÷»·¾³£º»ùÓÚÓÑÉÆÖ®±Ûmini2440¿ª·¢°å+Qtopia2.2°æ±¾+RedHat9+SQLite-3.3.6¡¿
1.QtopiaÖÐʹÓÃSQLite
ÓÉÓÚQt2²»Ö§³ÖÊý¾Ý¿â²Ù×÷£¬£¨Qt3°æ±¾¾ÍÌṩÁËÖ§³ÖÊý¾Ý¿â²Ù×÷µÄÀ࣬µ«ÊÇQtopia2±È½Ï¾­µä£¬ÊÇ»ùÓÚQt2µÄ£¬Ã»°ì·¨£¡£©ËùÒÔÔÚQt/Qtopia³ÌÐòÖÐÐèÒªÊý¾Ý¿âʱ£¬¿ÉÒÔ¿¼ÂÇÔÚQtÖÐʹÓÃLinuxϲÙ×÷SQLiteÊý¾Ý¿âµÄ·½·¨¡££¨±í´ïµÄÓе ......

[ת]JavaÁ¬½ÓSQLite dbÊý¾Ý¿âÎļþ

JavaÁ¬½ÓSQLiteÊý¾Ý¿âÏê½â ÏÂÔØSQLiteÊý¾Ý¿âµÄJDBC ÕâÀï¸ø³öÒ»¸öÖÐÎÄÕ¾µãµÄURL: ÉèÖû·¾³±äÁ¿£º ½«ÏÂÔص½µÄ°ü½âѹºóµÃµ½jar°ü sqlitejdbc-v033-nested.jar ·Åµ½%JAVA_HOME%\lib Ï£¬²¢ÇÒ½«ÆäÌí¼Óµ½classpathϵͳ»·¾³±äÁ¿ÖÐ,ÎÒµÄclasspathϵͳ»·¾³±äÁ¿ÏÖÔÚΪ: .;%JAVA_HOME%\lib;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\li ......

sqlite³£¼ûÎÊÌâ

 (1) ÈçºÎ½¨Á¢×Ô¶¯Ôö³¤×Ö¶Î?
¼ò¶Ì»Ø´ð£ºÉùÃ÷Ϊ INTEGER PRIMARY KEY µÄÁн«»á×Ô¶¯Ôö³¤¡£
³¤Ò»µãµÄ´ð°¸£º Èç¹ûÄãÉùÃ÷±íµÄÒ»ÁÐΪ INTEGER PRIMARY KEY£¬ÄÇô£¬ ÿµ±ÄãÔÚ¸ÃÁÐÉϲåÈëÒ»NULLֵʱ£¬ NULL×Ô¶¯±»×ª»»ÎªÒ»¸ö±È¸ÃÁÐÖÐ×î´óÖµ´ó1µÄÒ»¸öÕûÊý£¬Èç¹û±íÊǿյģ¬ ½«»áÊÇ1¡£ (Èç¹ûÊÇ×î´ó¿ÉÄܵÄÖ÷¼ü 9223372036854775807 ......

ÔÚ.NET C#ÖÐʹÓÃsqlite

 1¡£´Ówww.sqlite.orgÏÂÔØSQLite 3.3.4µÄ°æ±¾
ΪÁË·½±ã£¬ÎÒ°ÑËü½âѹÁË£¬¾ÍÒ»¸öSQLite3.exe£¬·ÅÈëWindowsĿ¼Ï¡£
Cmd ½øÈëÃüÁîÐÐ
1)
´´½¨Êý¾Ý¿âÎļþ:
>SQLite3 d:\test.db »Ø³µ
¾ÍÉú³ÉÁËÒ»¸ötest.dbÔÚdÅÌ¡£
ÕâÑùͬʱҲSQLite3¹ÒÉÏÁËÕâ¸ötest.db
2)
ÓÃ.help¿ÉÒÔ¿´¿´ÓÐʲôÃüÁî
>.help »Ø³µ¼´¿É
3)¿ÉÒ ......

SQLiteÊý¾Ý¿âʹÓÃ×ܽá

1.ÔÚSQLiteÖвåÈ뵱ǰʱ¼ä,±äÁ¿¶¨Òå²»Óöà˵
char *sql = sqlite3_mprintf("insert into Log VALUES(datetime('now', 'localtime'), '%q', '%q')", cUser, cLogContent);
int ret = sqlite3_exec(Sqlite3, sql, NULL, NULL, &pErrMsg);
ÒÔÔ·ÝΪµ¥Î»Í³¼Æ³ö·ûºÏµ±Ç°Ô·ݵļǼ, TimeΪÊý¾Ý¿âÖÐ×Ö¶ÎÃû:
char *sql = s ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ