ÈçºÎÈÃÄãµÄSQLÔËÐеøü¿ì
---- ÈËÃÇÔÚʹÓÃSQLʱÍùÍù»áÏÝÈëÒ»¸öÎóÇø£¬¼´Ì«¹Ø×¢ÓÚËùµÃµÄ½á¹ûÊÇ·ñÕýÈ·£¬¶øºöÂÔ
Á˲»Í¬µÄʵÏÖ·½·¨Ö®¼ä¿ÉÄÜ´æÔÚµÄÐÔÄܲîÒ죬ÕâÖÖÐÔÄܲîÒìÔÚ´óÐ͵ĻòÊǸ´ÔÓµÄÊý¾Ý¿â
»·¾³ÖУ¨ÈçÁª»úÊÂÎñ´¦ÀíOLTP»ò¾ö²ßÖ§³ÖϵͳDSS£©ÖбíÏÖµÃÓÈΪÃ÷ÏÔ¡£±ÊÕßÔÚ¹¤×÷ʵ¼ù
Öз¢ÏÖ£¬²»Á¼µÄSQLÍùÍùÀ´×ÔÓÚ²»Ç¡µ±µÄË÷ÒýÉè¼Æ¡¢²»³ä·ÝµÄÁ¬½ÓÌõ¼þºÍ²»¿ÉÓÅ»¯µÄwhe
re×Ӿ䡣ÔÚ¶ÔËüÃǽøÐÐÊʵ±µÄÓÅ»¯ºó£¬ÆäÔËÐÐËÙ¶ÈÓÐÁËÃ÷ÏÔµØÌá¸ß£¡ÏÂÃæÎÒ½«´ÓÕâÈý¸ö
·½Ãæ·Ö±ð½øÐÐ×ܽ᣺
---- ΪÁ˸üÖ±¹ÛµØ˵Ã÷ÎÊÌ⣬ËùÓÐʵÀýÖеÄSQLÔËÐÐʱ¼ä¾ù¾¹ý²âÊÔ£¬²»³¬¹ý£±ÃëµÄ¾ù
±íʾΪ£¨< 1Ã룩¡£
---- ²âÊÔ»·¾³--
---- Ö÷»ú£ºHP LH II
---- Ö÷Ƶ£º330MHZ
---- Äڴ棺128Õ×
---- ²Ù×÷ϵͳ£ºOperserver5.0.4
----Êý¾Ý¿â£ºSybase11.0.3
Ò»¡¢²»ºÏÀíµÄË÷ÒýÉè¼Æ
----Àý£º±írecordÓÐ620000ÐУ¬ÊÔ¿´ÔÚ²»Í¬µÄË÷ÒýÏ£¬ÏÂÃ漸¸ö SQLµÄÔËÐÐÇé¿ö£º
---- 1.ÔÚdateÉϽ¨ÓÐÒ»·Ç¸öȺ¼¯Ë÷Òý
select count(*) from record where date >
'19991201' and date < '19991214'and amount >
2000 (25Ãë)
select date,sum(amount) from record group by date
(55Ãë)
select count(*) from record where date >
'19990901' and place in ('BJ','SH') (27Ãë)
---- ·ÖÎö£º
----dateÉÏÓдóÁ¿µÄÖظ´Öµ£¬ÔÚ·ÇȺ¼¯Ë÷ÒýÏ£¬Êý¾ÝÔÚÎïÀíÉÏËæ»ú´æ·ÅÔÚÊý¾ÝÒ³ÉÏ£¬ÔÚ
·¶Î§²éÕÒʱ£¬±ØÐëÖ´ÐÐÒ»´Î±íɨÃè²ÅÄÜÕÒµ½ÕâÒ»·¶Î§ÄÚµÄÈ«²¿ÐС£
---- 2.ÔÚdateÉϵÄÒ»¸öȺ¼¯Ë÷Òý
select count(*) from record &n
Ïà¹ØÎĵµ£º
Ò»¡¢SQL SERVER ºÍACCESSµÄÊý¾Ýµ¼Èëµ¼³ö
³£¹æµÄÊý¾Ýµ¼Èëµ¼³ö£º
ʹÓÃDTSÏòµ¼Ç¨ÒÆÄãµÄAccessÊý¾Ýµ½SQL Server£¬Äã¿ÉÒÔʹÓÃÕâЩ²½Öè:
¡¡¡¡¡ð1ÔÚSQL SERVERÆóÒµ¹ÜÀíÆ÷ÖеÄTools£¨¹¤¾ß£©²Ëµ¥ÉÏ£¬Ñ¡ÔñData Transformation
¡¡¡¡¡ð2Services£¨Êý¾Ýת»»·þÎñ£©£¬È»ºóÑ¡Ôñ czdImport Dat ......
http://www.umgr.com/blog/PostView.aspx?bpId=36294
1. Ö´ÐÐsqlÓï¾ä
int sqlite3_exec(sqlite3*£¬ const char *sql£¬ sqlite3_callbacksql Óï·¨
£¬ void *£¬ char **errmsg );
Õâ¾ÍÊÇÖ´ÐÐÒ»Ìõ sql Óï¾äµÄº¯Êý¡£
µÚ1¸ö²ÎÊý²»ÔÙ˵ÁË£¬ÊÇÇ°Ãæopenº¯ÊýµÃµ½µÄÖ¸Õ롣˵ÁËÊǹؼüÊý¾Ý½á¹¹¡£
µÚ2¸ö²ÎÊýconst char ......
µÚÒ»²½£¬ÔÚÒµÎñ¸ß·åÆÚץȡÑù±¾Êý¾Ý£¨2¸öСʱ×óÓÒ£©¡£²ÉÓõŤ¾ßÊÇsqlserver×Ô´øµÄprofiler£¬Ò²½Ðʼþ̽²éÆ÷£¬ÈçÏÂͼ£º
½øÈëºó£¬µã»÷×î×óÃæµÄ°´Å¥£¬½¨Á¢Ò»¸öеĸú×Ù£º
µÇ¼ÐèÒªÓÃDBOȨÏÞ£¬ËùÒÔ¿ÉÒÔÓÃsaµÇ¼£¬Ò²¿ÉÒÔÓÃwindows¼¯³ÉÑéÖ¤·½Ê½£¨Èç¹ûµ±Ç°µÇ¼µÄ¾ÍÊÇsqlserverµÄ»°£©
н¨¸ú×Ù£¬Ò»¹²ÓÐ4¸ötabÒ³½øÐÐÅ ......
/*
lvl1 lvl2 lvl3 lvl4 lvl
4 3 4 1
3 2 2&nb ......