Ó°ÏìSQL serverÐÔÄܵĹؼüÈý¸ö·½Ãæ
1 Âß¼Êý¾Ý¿âºÍ±íµÄÉè¼Æ
Êý¾Ý¿âµÄÂß¼Éè¼Æ¡¢°üÀ¨±íÓë±íÖ®¼äµÄ¹ØϵÊÇÓÅ»¯¹ØϵÐÍÊý¾Ý¿âÐÔÄܵĺËÐÄ¡£Ò»¸öºÃµÄÂß¼Êý¾Ý¿âÉè¼Æ¿ÉÒÔΪ
ÓÅ»¯Êý¾Ý¿âºÍÓ¦ÓóÌÐò´òÏÂÁ¼ºÃµÄ»ù´¡¡£
±ê×¼»¯µÄÊý¾Ý¿âÂß¼Éè¼Æ°üÀ¨ÓöàµÄ¡¢ÓÐÏ໥¹ØϵµÄÕ±íÀ´´úÌæºÜ¶àÁеij¤Êý¾Ý±í¡£ÏÂÃæÊÇһЩʹÓñê×¼»¯
±íµÄһЩºÃ´¦¡£
A:ÓÉÓÚ±íÕ£¬Òò´Ë¿ÉÒÔʹÅÅÐòºÍ½¨Á¢Ë÷Òý¸üΪѸËÙ
B:ÓÉÓÚ¶à±í£¬ËùÒÔ¶àïßµÄË÷Òý³ÉΪ¿ÉÄÜ
C:¸üÕ¸ü½ô´ÕµÄË÷Òý
D:ÿ¸ö±íÖпÉÒÔÓÐÉÙһЩµÄË÷Òý£¬Òò´Ë¿ÉÒÔÌá¸ßinsert update deleteµÈµÄËٶȣ¬ÒòΪÕâЩ²Ù×÷ÔÚË÷Òý
¶àµÄÇé¿öÏ»á¶ÔϵͳÐÔÄܲúÉúºÜ´óµÄÓ°Ïì
E:¸üÉٵĿÕÖµºÍ¸üÉٵĶàÓàÖµ£¬Ôö¼ÓÁËÊý¾Ý¿âµÄ½ô´ÕÐÔ
ÓÉÓÚ±ê×¼»¯£¬ËùÒÔ»áÔö¼ÓÁËÔÚ»ñÈ¡Êý¾ÝʱÒýÓñíµÄÊýÄ¿ºÍÆä¼äµÄÁ¬½Ó¹ØϵµÄ¸´ÔÓÐÔ¡£Ì«¶àµÄ±íºÍ¸´ÔÓµÄÁ¬½Ó¹Øϵ»á½µµÍ·þÎñÆ÷µÄÐÔÄÜ£¬Òò´ËÔÚÕâÁ½ÕßÖ®¼äÐèÒª×ۺϿ¼ÂÇ¡£
¶¨Òå¾ßÓÐÏà¹Ø¹ØϵµÄÖ÷¼üºÍÍâÀ´¼üʱӦ¸Ã×¢ÒâµÄÊÂÏîÖ÷ÒªÊÇ£ºÓÃÓÚÁ¬½Ó¶à±íµÄÖ÷¼üºÍ²Î¿¼µÄ¼üÒªÓÐÏàͬµÄÊý¾ÝÀàÐÍ¡£
2 Ë÷ÒýµÄÉè¼Æ
A:¾¡Á¿±ÜÃâ±íɨÃè
¼ì²éÄãµÄ²éѯÓï¾äµÄwhere×Ӿ䣬ÒòΪÕâÊÇÓÅ»¯Æ÷ÖØÒª¹Ø×¢µÄµØ·½¡£°üº¬ÔÚwhereÀïÃæµÄÿһÁУ¨column)¶¼ÊÇ¿ÉÄܵĺîÑ¡Ë÷Òý£¬ÎªÄÜ´ïµ½×îÓŵÄÐÔÄÜ£¬¿¼ÂÇÔÚÏÂÃæ¸ø³öµÄÀý×Ó£º¶ÔÓÚÔÚwhere×Ó¾äÖиø³öÁËcolumn1Õâ¸öÁС£
ÏÂÃæµÄÁ½¸öÌõ¼þ¿ÉÒÔÌá¸ßË÷ÒýµÄÓÅ»¯²éѯÐÔÄÜ£¡
µÚÒ»£ºÔÚ±íÖеÄcolumn1ÁÐÉÏÓÐÒ»¸öµ¥Ë÷Òý
µÚ¶þ£ºÔÚ±íÖÐÓжàË÷Òý£¬µ«ÊÇcolumn1ÊǵÚÒ»¸öË÷ÒýµÄÁÐ
±ÜÃⶨÒå¶àË÷Òý¶øcolumn1Êǵڶþ¸ö»òºóÃæµÄË÷Òý£¬ÕâÑùµÄË÷Òý²»ÄÜÓÅ»¯·þÎñÆ÷ÐÔÄÜ
ÀýÈ磺ÏÂÃæµÄÀý×ÓÓÃÁËpubsÊý¾Ý¿â¡£
SELECT au_id, au_lname, au_fname from authors
WHERE au_lname = 'White'
°´ÏÂÃ漸¸öÁÐÉϽ¨Á¢µÄË÷Òý½«»áÊǶÔÓÅ»¯Æ÷ÓÐÓõÄË÷Òý
?au_lname
?au_lname, au_fname
¶øÔÚÏÂÃ漸¸öÁÐÉϽ¨Á¢µÄË÷Òý½«²»»á¶ÔÓÅ»¯Æ÷Æ𵽺õÄ×÷ÓÃ
?au_address
?au_fname, au_lname
¿¼ÂÇʹÓÃÕµÄË÷ÒýÔÚÒ»¸ö»òÁ½¸öÁÐÉÏ£¬ÕË÷Òý±È¶àË÷ÒýºÍ¸´ºÏË÷Òý¸üÄÜÓÐЧ¡£ÓÃÕµÄË÷Òý£¬ÔÚÿһҳÉÏ
½«»áÓиü¶àµÄÐк͸üÉÙµÄË÷Òý¼¶±ð£¨Ïà¶ÔÓë¶àË÷ÒýºÍ¸´ºÏË÷Òý¶øÑÔ£©£¬Õ⽫ÍƽøϵͳÐÔÄÜ¡£
¶ÔÓÚ¶àÁÐË÷Òý£¬SQL Serverά³ÖÒ»¸öÔÚËùÓÐÁеÄË÷ÒýÉϵÄÃܶÈͳ¼Æ£¨ÓÃÓÚÁªºÏ£©ºÍÔÚµÚÒ»¸öË÷ÒýÉϵÄ
histogram£¨Öù״ͼ£©Í³¼Æ¡£¸ù¾Ýͳ¼Æ½á¹û£¬Èç¹ûÔÚ¸´ºÏË÷ÒýÉϵĵÚÒ»¸öË÷ÒýºÜÉÙ±»Ñ¡ÔñʹÓã¬ÄÇôÓÅ»¯Æ÷¶ÔºÜ¶à²éѯÇëÇ󽫲»»áʹÓÃË÷Òý¡£
ÓÐÓõÄË÷Òý»áÌá¸ßselectÓï¾äµÄÐÔÄÜ£¬°üÀ¨insert,uodate,delete¡
Ïà¹ØÎĵµ£º
ÐèÇó£ºÓÐexcelÎļþ£¬º¬¶à¸ösheet£¬Ã¿¸ösheetµÄÄÚÈݶÔÓ¦²åÈëµ½Ò»ÕÅ±í£¬sheetµÄÃû³Æ¾ÍÊǶÔÓ¦µÄ±íÃû³Æ¡£
ÿһÐÐΪÁÐÃû£¬ÀýÈ磺
´ï³É£º½«Ã¿¸ösheetÊä³ö³ÉÒ»¸öÒÔsheetÃû³ÆÃüÃûµÄsqlÎļþ£¬ÄÚÈÝΪÿÐÐÄÚÈݵÄinsertÓï¾ä¡£
ÒÔÉÏͼΪÀý»áÉú³ÉÈý¸ösqlÎļþ£¬·Ö±ðÊÇTF_R_TERMINAL_ARCH.sql£¬ TF_R_STOCK_TRADE.sql ºÍ TF_R_STOC ......
--SQL Server£º
Select TOP N * from TABLE Order By NewID()
--Access£º
Select TOP N * from TABLE Order By Rnd(ID)
Rnd(ID) ÆäÖеÄIDÊÇ×Ô¶¯±àºÅ×ֶΣ¬¿ÉÒÔÀûÓÃÆäËûÈκÎÊýÖµÀ´Íê³É£¬±ÈÈçÓÃÐÕÃû×Ö¶Î(U ......
½ñÌìÔÚÓÃJTDSÁ¬½ÓSQL Server ʱºò£¬Óöµ½¼¸¸öÎÊÌ⣬¼Ç¼ÈçÏ£º
error while performing database login with the jtds driver:
network error ioexception:connection refused: connect
È»ºó²é¿´¶Ë¿Ú£¬ÔÀ´ÊÇ1433¶Ë¿Úδ´ò¿ª£¬È»ºóÔÚSQL Server configuration ManagerϵÄTCP\IPÖÐÆôÓÃ1433¶Ë¿Ú£¬ÖØÆôSQL Server·þÎñ£¬netst ......
Êý¾Ý²Ù×÷Àà SQLHelper.cs
http://www.cnblogs.com/zengxiangzhan/archive/2009/12/31/1636871.html
ÎÞÏÞ¼¶·ÖÀà ´æ´¢¹ý³Ì
http://www.cnblogs.com/zengxiangzhan/archive/2010/01/04/1639220.html
°ÙÍò¼¶·ÖÒ³´æ´¢
http://www.cnblogs.com/zengxiangzhan/archive/2009/09/12/1565313.html
SQL¾µä¶ÌС´úÂëÊÕ¼¯
htt ......
Ò»¡¢ SQL SERVER ºÍACCESSµÄÊý¾Ýµ¼Èëµ¼³ö
³£¹æµÄÊý¾Ýµ¼Èëµ¼³ö£º
ʹÓÃDTSÏòµ¼Ç¨ÒÆÄãµÄAccessÊý¾Ýµ½SQL Server£¬Äã¿ÉÒÔʹÓÃÕâЩ²½Öè:
¡¡¡¡1ÔÚSQL SERVERÆóÒµ¹ÜÀíÆ÷ÖеÄTools£¨¹¤¾ß£©²Ëµ¥ÉÏ£¬Ñ¡ÔñData Transformation
¡¡¡¡2Services£¨Êý¾Ýת»»·þÎñ£©£¬È»ºó ......