´´½¨sqlite µÄvs2008 ¹¤³Ì
½üÀ´ÒòΪ¹¤×÷ÐèÒª¼ÓÈësqlite ´¦ÀíÊý¾Ý£¬ÏÂÔØÁËsqlite3.6.22(amalgamation °æ±¾£©£¬ÓÖÏë×Ô¼º¶¯ÊÖ±àÒë³öÀ´Ï붯̬Á´½Ó¾Í¶¯Ì¬£¬Ï뾲̬Á´½ÓÒ²¿ÉÒÔ£¬ÓÚÊÇÓÐÁËÕâƪÎÄÕ£¬ÓÐÒâ˼µÄÊÇ֮ǰҲÊÔ¹ý±àÒëSqlite£¬µ«Ã»³É¹¦£¬²»ÁËÁËÖ®£¬¿ÉÄܽüÀ´Òª¹ýÄêÁË
¸ú
RPÓйذÉ:)¡£
1 Ê×ÏÈ´´½¨vs2008µÄÒ»¸ö¿ÕDLL¹¤³Ì;
2 ½«sqlite3.cÎļþÌí¼Óµ½¹¤³Ì£¬²»ÐèÒªsqlite3.hÍ·Îļþ£¬sqlite3.cÒѾ°üº¬ÁËÍ·ÎļþµÄ½Ó¿Ú¸úÊý¾Ý½á¹¹¡£
3. ×îÖØÒªµÄÒ»²½£¬½«±àÒëÑ¡ÏîÀïµÄ"±àÒë³ÉC++"¸ÄΪ“±àÒë³ÉC”£¬ÎÒÔÚGoogleÏֳɵÄsqlite vs¹¤³Ì·¢ÏÖÐí¶àÈ˶¼ÒòΪÄÇЩ·³È˵ÄÀàÐÍû¶¨Òå»òÕß²»Æ¥Åä±ÀÀ££¬ÐÞ¸ÄÕâ¸öÑ¡Ïîºó¾Í²»ÐèÒªÐ޸ĴúÂëÁË¡£
4. sqliteÍøÕ¾Ìṩһ¸öWindowsµÄ±àÒë¿â£¬ÎÒûÓõ½ÄǸöDLL£¬µ«ÄǸösqlite3.defÈ´¿ÉÒÔÓÃÀ´ÉùÃ÷µ¼³öº¯Êý£¬±È×Ô¼ºÈ¥µ¼³öÊ¡Á¦£¬ËùÒÔÒ²Ìí¼Ó½ø¹¤³Ì¡£
5 »¹ÓÐÒ»¸ö±àÒëºê£¬SQLITE_ENABLE_COLUMN_METADATA£¬Èç¹ûÓöµ½sqlite3_column_database_name**£¨£©º¯Êýû¶¨Ò壬ÄǾÍÊÇÌáÐÑÒª¼Ó½øÕâ¸öºêÁË£¬ÎÒÊÇÔÚ¹¤³Ì"ÊôÐÔ"¿ò------> C++ ------->Preprocessor-------->Preprocessor DefinitionÌí¼ÓµÄ£¬µ±È»Ò²¿ÉÒÔÔÚÆäËûµØ·½Ìí¼Ó£¬
µ«ÒÔÎÒµÄÏë·¨£¬ÔÚÕâÀïÌí¼Ó²»ÐèÒª¸Ä¶¯´úÂ룬¶øÇÒÒÔºósqlite°æ±¾Éý¼¶£¬Ö»ÐèÒªÔÚ¹¤³ÌĿ¼ÀïÌæ»»sqlite3.c ºÍsqlite3.def£¬Ò»ÀÍÓÀÒÝ£¬¡¡Ï£ÍûÈç´Ë°É£¡
6 Ìí¼ÓÁËÒ»¸ö°æ±¾ÐÅÏ¢£¬³£ÓÃVCµÄ¿Ï¶¨ÖªµÀ£¬°æ±¾Éý¼¶¾ÍÖ±½ÓÔÚsqlite_version.rcÀïÃæÐ޸İ汾ºÅ¾ÍÊÇÁË¡£
ÉÏ´«ÁËÒ»·Ýµ½CSDN£¬²»ÖªµÀCSDNµ½µ×ÔÚÄÄÀïÖ§³Ö¸½¼þÉÏ´« :)
http://download.csdn.net/source/2022243
Ïà¹ØÎĵµ£º
Ç°Ò»Õó×Ö×öÏîÄ¿(ǶÈëʽlinux)£¬ÓÉÓÚÒª±£´æ´óÁ¿µÄÊý¾Ý£¬¶øÇÒ×Ҫ±£´æ30ÌìµÄʱ¼ä¡£±¾À´´òËã±£´æµ½ÎļþÖУ¬Ã¿´ÎÆô¶¯Ó¦ÓóÌÐòµÄʱºòÖØнâÎöÒ»±é£¬¿ÉÊǵ±Êý¾ÝÁ¿ºÜ´óµÄʱºò£¬¾Í³öÏÖЧÂʵÄÎÊÌâÁË¡£ËùÒÔ×îºó»¹ÊÇ·ÅÆúÁËʹÓÃÎļþµÄ´òË㣬¾ö¶¨Ê¹ÓÃÊý¾Ý¿â´æÈ¡Êý¾Ý¡£
linuxϵÄÊý¾Ý¿âÒ²ºÜ¶à£¬ÓпªÔ´µÄ£¬Ò²ÓÐÊշѵġ£¶ÔÓÚÎÒÃÇÀ´Ëµ£¬¿Ï ......
.dump ?TABLE? ... ÒÔSQLÓï¾ä·½Ê½ÏÔʾ±íµÄ½á¹¹¡£È磺
sqlite> .dump websties
BEGIN TRANSACTION;
COMMIT;
sqlite> .dump websites
BEGIN TRANSACTION;
CREATE TABLE [websites] (
[WebID] INTEGER NOT NULL PRIMARY KEY,
[WebName] VARCHAR(20) NULL
);
INSERT INTO "websites" VALUES(1,'CTOChina.net'); ......
×î½ü¹«Ë¾ÐèÒª½«×ÀÃæϵͳ²¿Êðµ½PDAÉÏÃæÈ¥£¬Ñ¡ÔñÁËWM6×÷Ϊ²¿Êðƽ̨¡£ÔÚÑ¡ÔñÊý¾Ý¿â·½Ãæ³öÏÖÁËÒ»µã¹ËÂÇ£¬ÒòΪ¶ÔÓÚPDA¶øÑÔ£¬ÐÔÄÜÊÇÊ×Òª¿¼ÂǵÄÒòËØ¡£
ÔÚ¿ªÔ´µÄÊý¾Ý¿âSqliteºÍSQLCEÖ®¼äÅÇ»²£¬ËùÒÔÕë¶ÔÕâ¸öÇé¿ö£¬¶ÔSqliteºÍSQLCEÔÚWM6ÉÏÃæ×öÁËÐÔÄܲâÊÔ¡£ÎÒÒ²½«×Ô¼ºÔÚ×ö²âÊÔ¹ý³ÌÖÐÅöµ ......
ÔÚSQLÖÐÓÐÈçÏÂÁ½ÖÖ·½·¨¿ÉÒÔʵÏÖ½«Ò»¸ö±íÖÐÊý¾Ýµ½ÁíÒ»¸ö±íÖÐ
1> select ... into new_tablename from ... where ...
2> insert (into) old_tablename select ... from ... where ...
Çø±ðÊÇÇ°Õß°ÑÊý¾Ý²åÈëÒ»¸öÐÂ±í£¨ÏȽ¨Á¢±í£¬ÔÙ²åÈëÊý¾Ý£©£¬
ºóÕßÊÇ°ÑÊý¾Ý²åÈëÒѾ´æÔÚµÄÒ»¸ö±íÖУ¬ÎÒ¸öÈËϲ»¶ºóÕߣ¬Òò ......
1¡¢ÈçºÎ½¨Á¢×Ô¶¯Ôö³¤×Ö¶Î?
¼ò¶Ì»Ø´ð£ºÉùÃ÷Ϊ INTEGER PRIMARY KEY µÄÁн«»á×Ô¶¯Ôö³¤¡£
³¤Ò»µãµÄ´ð°¸£º Èç¹ûÄãÉùÃ÷±íµÄÒ»ÁÐΪ INTEGER PRIMARY KEY£¬ÄÇô£¬ ÿµ±ÄãÔÚ¸ÃÁÐÉϲåÈëÒ»NULLֵʱ£¬ NULL×Ô¶¯±»×ª»»ÎªÒ»¸ö±È¸ÃÁÐÖÐ×î´óÖµ´ó1µÄÒ»¸öÕûÊý£¬Èç¹û±íÊǿյģ¬ ½«»áÊÇ1¡ ......