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

SqliteÖÐÎÄÅÅÐòÑо¿

תÔØʱÇë×¢Ã÷³ö´¦ºÍ×÷ÕßÁªÏµ·½Ê½£ºhttp://blog.csdn.net/absurd
×÷ÕßÁªÏµ·½Ê½£ºLi XianJing <xianjimli at hotmail dot com>
¸üÐÂʱ¼ä£º2006-12-19
SqliteÊÇÒ»¸öÓÃCÓïÑÔʵÏÖµÄСÐÍSQLÊý¾Ý¿âÒýÇæ¡£ËüÌå»ýСÇɵ«¹¦ÄÜÇ¿´ó£¬¶ÔÓ²¼þ×ÊÔ´ÒªÇóºÜµÍ¶øÇÒÐÔÄܱíÏÖ׿Խ£¬·Ç³£ÊʺÏÓÚǶÈëʽӦÓû·¾³¡£×î½ü·¢ÏÖsqlite²¢²»Ö§³ÖÖÐÎÄ(Æ´Òô/±Ê»­)ÅÅÐò£¬¶øÕâ¸ö¹¦ÄÜÓÖÊÇÎÒÃDZØÐèµÄ£¬ËùÒÔ»¨ÁËЩʱ¼äÈ¥Ñо¿¡£ÎÒ¶ÔSqliteµÄÁ˽âÖ»ÄÜËãÊÇÒµÓ༶£¬ÔÚÑо¿µÄ¹ý³Ì»òÐí×ßÁËЩÍä·£¬»òÐíÒѾ­ÓÐÏÖ´æµÄËã·¨¿ÉÀûÓ㬲»¹ÜÔõôÑù£¬ÔÚÑо¿¹ý³ÌÖл¹ÊÇÓв»ÉÙÊÕ»ñ£¬Ð´³öÀ´ºÍ´ó¼Ò̽ÌÖһϡ£
ÎÒÃÇÖªµÀ£¬¼ÆËã»úÖеÄÿһ¸ö×Ö·û¶¼ÓÐÒ»¸öÄÚÂë¡£ÔÚĬÈÏÇé¿öÏ£¬¼ÆËã»úÅÅÐòʱ£¬±È½ÏÁ½¸ö×Ö·ûµÄ´óС¾ÍÊDZȽÏ×Ö·ûÄÚÂëµÄ´óС£¬Õâ¶ÔÓÚÓ¢ÎÄÀ´ËµÃ»ÓÐÎÊÌ⣬ÒòΪӢÎÄ×ÖĸµÄÄÚÂëÊÇ°´×Öĸ˳ÐòµÝÔöµÄ¡£¶ÔÓÚÖÐÎÄÀ´Ëµ£¬¾Í±È½ÏÂé·³ÁË£ºÊ×ÏÈ£¬ÖÐÎĵÄÅÅÐò·½Ê½ÓжàÖÖ£¬±ÈÈç°´ÄÚÂëÅÅÐò¡¢°´Æ´ÒôÅÅÐòºÍ°´±Ê»­ÅÅÐò£¬ÒªÍ¨¹ý²ÎÊýÖ¸¶¨ÅÅÐòµÄ·½Ê½£¬·ñÔò¼ÆËã»ú¾Í°´ÄÚÂëÅÅÐòÁË¡£Æä´Î£¬ºº×ÖµÄÄÚÂë˳Ðò¼´²»Í¬ÓÚÆ´Òô˳Ðò£¬Ò²²»Í¬ÓÚ°´±Ê»­Ë³Ðò¡£ÔÚGB2312±àÂëÖУ¬ºº×Ö»ù±¾ÉÏ°´Æ´ÒôÅÅÐò£¨¾Ý˵ÓÐÀýÍ⣬²»Ì«Çå³þ£©¡£ÔÚGBKÖУ¬ËüÔÚGB2312»ù´¡ÉϽøÐÐÁËÀ©³ä£¬¼æÈÝGB2312ÖеÄËùÓÐ×Ö·û£¬ËùÒÔ²»ÊÇ°´Æ´ÒôÅÅÐòÁË¡£ÔÚUnicodeÖУ¬ºº×ÖµÄÅÅÁÐËƺõ¸üûÓÐʲô¹æÂÉ¿ÉÑÔÁË¡£
ΪÁ˽â¾öÄÚÂë˳ÐòÓëÓû§Ï°¹ß˳Ðò(ÈçÆ´Òô˳Ðò)µÄ³åÍ»£¬ÔÚglibcµÄlocaleÊý¾ÝÀҪÇóÌṩÅÅÐò·½Ê½(collate)µÄÃèÊö¡£ÎÒ¿´ÁËÒ»ÏÂglibc-2.3.5ÌṩµÄlocaleÊý¾Ý£¬ÔÚ¼òÌåÖÐÎÄ(zh_CN)µÄlocaleÊý¾ÝÃèÊöÀ¹ØÓÚÅÅÐò·½Ê½µÄÃèÊöÈçÏ£º
% ISO 14651 collation sequence
LC_COLLATE
copy "iso14651_t1"
END LC_COLLATE
Ò²¾ÍÊÇ˵£¬ÕÕ³­iso14651_t1µÄÅÅÐò·½Ê½¡£´ò¿ªiso14651_t1Îļþ¿´ÁËһϣ¬Ò²Ã»Óз¢ÏÖ¹ØÓÚÖÐÎĵÄÌØÊâ´¦Àí£¬¿ÉÒÔÍƶÏglibcĬÈϵÄÅÅÐò·½Ê½¾ÍÊÇ°´unicodeÅÅÐò¡£
ËùÒÔ²»ÄÜÖ¸ÍûglibcÌṩÖÐÎÄÅÅÐò¹¦ÄÜ£¬Èç¹ûSQLiteÖ§³ÖÁËÖÐÎÄÅÅÐòÖ»ÄÜÊÇ×öÁËÌØÊâ´¦Àí¡£ä¯ÀÀÁËÒ»ÏÂSQLiteµÄ´úÂ룬ÕâÖÖÏ£ÍûËƺõÒ²²»´ó¡£ÔÚÍøÉÏҲûÓв鵽Ïà¹ØµÄ×ÊÁϺͲ¹¶¡£¬¿´À´Ö»ÄÜ¿¿×Ô¼ºÁË¡£
²»¹ý£¬ÔÚä¯ÀÀSQLite´úÂëʱ»¹ÊÇÓÐЩÊÕ»ñ£¬ÖÁÉÙÖªµÀÁËËü±È½ÏÊý¾Ý¼Ç¼µÄ¹ý³Ì£º
1.         sqlite3VdbeExecµ÷ÓÃsqlite3BtreeInsert°Ñ¼Ç¼²åÈëµ½Êʵ±µÄλÖá£
2.         sqlite3BtreeInsertµ÷ÓÃsqlite3BtreeMovetoÕÒµ½Òª²åÈëµÄλÖá£


Ïà¹ØÎĵµ£º

AutoIt3¿ª·¢µÄ²Ù×÷SQliteÊý¾Ý¿âµÄÔ´Âë

AutoIt3¿ª·¢µÄ²Ù×÷SQliteÊý¾Ý¿âµÄÔ´ÂëÏÂÔØ
²¿·ÖÔ´Âë
_SQLite_Startup () ;¼ÓÔØ SQLite.dll
If Not FileExists($SQLite_Data_Path) Then
    SQLCreate()
EndIf
$GUI_Form = GUICreate($Title, 300, 435, -1, -1)
GUISetBkColor(0xECE9D8)  ; will change background color
$GUI_ListBox = GUIC ......

SQLiteÓï·¨ CREATE TRIGGER


ʱ¼ä:
2009-08-14 21:18:18À´Ô´:
ÍøÂç ×÷Õß:
δ
Öª µã»÷:
214
´Î
CREATE TRIGGER
    
        
            sql-statement ::=
       ......

sqlite´¥·¢Æ÷Ò»Àý

int column_names_printed = 0;
void print_row(int n_values, char** values)
{
    int i;
    for (i = 0; i < n_values; ++i) {
        printf("%10s", values[i]);
    }
    printf("\n& ......

×ܽáSQLite²»Ö§³ÖµÄSQLÓï·¨ÓÐÄÄЩ


1 TOP
ÕâÊÇÒ»¸ö´ó¼Ò¾­³£Îʵ½µÄÎÊÌ⣬ÀýÈçÔÚSQLSERVERÖпÉÒÔʹÓÃÈçÏÂÓï¾äÀ´È¡µÃ¼Ç¼¼¯ÖеÄÇ°Ê®Ìõ¼Ç¼£º
SELECT TOP 10 * from [index] ORDER BY indexid DESC;
 
µ«ÊÇÕâÌõSQLÓï¾äÔÚSQLiteÖÐÊÇÎÞ·¨Ö´Ðеģ¬Ó¦¸Ã¸ÄΪ£º
SELECT * from [index] ORDER BY indexid DESC limit 0,10;
 
ÆäÖÐlimit 0,10±íʾ´ÓµÚ0 ......

SQLiteÃüÁîÐгÌÐò˵Ã÷

sqlite3: Ò»¸öSQLiteÊý¾Ý¿âµÄÃüÁîÐнӿÚ
ÒëÕß×¢
Ô­ÎĵØÖ·£ºhttp://www.sqlite.org/sqlite.html
    SQLite¿â°üº¬Ò»¸öÃû×Ö½Ð×ösqlite3 µÄÃüÁîÐÐ,Ëü¿ÉÒÔÈÃÓû§ÊÖ¹¤ÊäÈë²¢Ö´ÐÐÃæÏòSQLiteÊý¾Ý¿âµÄSQLÃüÁî¡£±¾ÎĵµÌṩһ¸öÑùʹÓÃsqlite3µÄ¼òҪ˵Ã÷¡£
¿ªÊ¼
    Æô¶¯sqlite3 ³ÌÐò£¬½ö½öÐèÒªÇÃÈ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ