ºìÁªLinuxÃÅ»§
Linux°ïÖú

SQL ServerÓë AccessÔÚSQLÓï·¨ÉϵIJîÒì

·¢²¼Ê±¼ä:2006-10-17 22:45:42À´Ô´:ºìÁª×÷Õß:linuxcms
Òý:SQL Server¡¢Microsoft Access¶¼ÊÇ΢ÈíµÄ²úÆ·¡£Ç°ÕßÓÃÓÚÖÐÐÍÆóÒµ¼¶Ó¦Ó㬺óÕßÊÇСÐÍÊý¾Ý¿âµÄ´ú±í£¬³õѧÕßÒ×ÓÚÕÆÎÕ¡£ÔÚ¿ª·¢Ò»°ãÐÅϢϵͳʱ£¬ÓÈÆäÊǵ¥»ú°æ£¬´ó¶¼²ÉÓÃAccess¡£ËäÈ»SQL ServerÒ²ÓиöÈË×ÀÃæ°æ£¬µ«ÊÇÔËÐÐʱÐèÕ¼Óý϶àµÄϵͳ×ÊÔ´¡£
[font=ËÎÌå]ÔÚ¾ÖÓòÍø¹ã·ºÓ¦ÓõÄÐÎÊÆÏ£¬ÍøÂç°æÈí¼þ´óÐÐÆäµÀ£¬²»ÉÙÈí¼þ´Óµ¥»ú°æ¹ý¶Éµ½[/font][font=Times New Roman]C/S[/font][font=ËÎÌå]ģʽµÄÍøÂçÓ¦Óã¬Í¨¹ý[/font][font=Times New Roman]SQL[/font][font=ËÎÌå]Óï¾ä´Ó·þÎñ¶Ë»ñÈ¡Êý¾Ý¼¯£¬½«²éѯ½á¹û·µ»Ø¸ø¿Í»§¶Ë¡£[/font]
[font=Times New Roman]Access[/font][font=ËÎÌå]ÖÐÌṩ²éѯ¶ÔÏó£¬ÔÚÉè¼Æʱ¿ÉÒÔ²ÉÓÃÉè¼ÆÊÓͼºÍ[/font][font=Times New Roman]SQL[/font][font=ËÎÌå]ÊÓͼ£¬·Ç³£·½±ã£¬[/font][font=Times New Roman]SQL[/font][font=ËÎÌå]ÊÓͼÖеÄ[/font][font=Times New Roman]SQL[/font][font=ËÎÌå]Óï¾ä¿ÉÒÔÔÚ[/font][font=Times New Roman]SQL SERVER[/font][font=ËÎÌå]ÖÐʹÓ㬵«ÊÇ·ñÍêÈ«¿ÉÓÃÄØ£¿´ð°¸ÊÇ·ñ¶¨µÄ£¬±í[/font][font=Times New Roman]1[/font][font=ËÎÌå]ÖÐ×ܽáÁË[/font][font=Times New Roman] Microsoft Access [/font][font=ËÎÌå]ºÍ[/font][font=Times New Roman] Microsoft SQL Servers [/font][font=ËÎÌå]µÄ[/font][font=Times New Roman] SQL [/font][font=ËÎÌå]Óï·¨µÄÖØÒªÇø±ð¡£[/font][font=Times New Roman] [/font]
[font=ËÎÌå]±í[/font][font=Times New Roman]1[/font][table=98%][tr][td=1,1,26%][align=center][font=Times New Roman]SQL [/font][font=ËÎÌå]Óï·¨ÔªËØ[/font][/size][/align][/td][td=1,1,33%][align=center][font=Times New Roman]Microsoft
Access
[size=12pt]
[/font][/align][/td][td=1,1,39%][align=center][font=Times New Roman]Microsoft SQL
Server
[/size][/font][/align][/td][/tr][tr][td=1,1,26%][font=ËÎÌå]±êʶ·û[/font][size=12pt]
[/td][td=1,1,33%][font=ËÎÌå]ÏÞÖƲ»³¬¹ý[/font][font=Times New Roman] 64 [/font][font=ËÎÌå]¸ö×Ö·û¡£[/font][font=Times New Roman] [/font]
[font=ËÎÌå]ÔÊÐíʹÓùؼü×ÖºÍÌØÊâ×Ö·û¡£[/font]
[font=ËÎÌå]¿ÉÒÔÓÃÈκÎ×Ö·û¿ªÍ·¡£[/font][/color]
[/td][td=1,1,39%][font=Times New Roman]SQL Server 6.5[/font][font=ËÎÌå]£º[/font]
[list][font=ËÎÌå]ÏÞÖƲ»³¬¹ý[/font][font=Times New Roman] 30 [/font][font=ËÎÌå]¸ö×Ö·û¡£[/font] [font=ËÎÌå]²»ÔÊÐíʹÓùؼü×ÖºÍÌØÊâ×Ö·û¡£[/font] [*][font=ËÎÌå]±ØÐëÓÃ×Öĸ×Ö·û¿ªÍ·¡£[/font][font=Times New Roman] [/font][/list][list=1][/size][/list][size=3]SQL Server 7.0 [font=ËÎÌå]µÄ±êʶ·ûÓë[/font] Access [font=ËÎÌå]ÍêÈ«¼æÈÝ¡£[/font][color=windowtext]
[/td][/tr][tr][td=1,1,26%][font=ËÎÌå]Êä³ö×Ö¶Î[/font][size=12pt]
[/size][/td][td=1,1,33%][font=ËÎÌå]ÔÊÐí¶à¸öÊä³ö×ֶξßÓÐÏàͬÃû³Æ¡£[/font][size=12pt]
[/size][/td][td=1,1,39%][font=ËÎÌå]ÔÚÊÓͼÖв»Ö§³Ö¶à¸öÏàͬÊä³ö×Ö¶ÎÃû¡£[/font][size=12pt]
[/size][/td][/tr][tr][td=1,1,26%][font=ËÎÌå]ÈÕÆÚ·Ö¸ô·ûºÅ[/font][size=12pt]
[/size][/td][td=1,1,33%][font=ËÎÌå]Ó¢°÷·û£¨[/font][font=Times New Roman]#[/font][font=ËÎÌå]£©[/font][size=12pt]
[/size][/td][td=1,1,39%][font=ËÎÌå]ƲºÅ£¨[/font][font=Times New Roman]'[/font][font=ËÎÌå]£©[/font][size=12pt]
[/size][/td][/tr][tr][td=1,1,26%][font=Times New Roman]Boolean [/font][font=ËÎÌå]³£Á¿[/font][size=12pt]
[/size][/td][td=1,1,33%][font=Times New Roman]True[/font][font=ËÎÌå]¡¢[/font][font=Times New Roman]False[/font][font=ËÎÌå]£»[/font][font=Times New Roman]On[/font][font=ËÎÌå]¡¢[/font][font=Times New Roman]Off[/font][font=ËÎÌå]£»[/font][font=Times New Roman]Yes[/font][font=ËÎÌå]¡¢[/font][font=Times New Roman]No[/font][font=ËÎÌå]¡£[/font][size=12pt]
[/size][/td][td=1,1,39%][font=ËÎÌå]ÕûÊý£º[/font][font=Times New Roman]1[/font][font=ËÎÌå]£¨Õ棩¡¢[/font][font=Times New Roman]0[/font][font=ËÎÌå]£¨¼Ù£©[/font][font=Times New Roman] [size=12pt][/font]
[/size][/td][/tr][tr][td=1,1,26%][font=ËÎÌå]×Ö·û´®Á¬½Ó[/font][size=12pt]
[/size][/td][td=1,1,33%][font=ËÎÌå]ºÍºÅ£¨[/font][font=Times New Roman]&[/font][font=ËÎÌå]£©[/font][size=12pt]
[/size][/td][td=1,1,39%][font=ËÎÌå]¼ÓºÅ£¨[/font][font=Times New Roman]+[/font][font=ËÎÌå]£©[/font][size=12pt]
[/size][/td][/tr][tr][td=1,1,26%][font=ËÎÌå]ͨÅä·û[/font][size=12pt]
[/size][/td][td=1,1,33%][font=ËÎÌå]ÐǺţ¨[/font][font=Times New Roman]*[/font][font=ËÎÌå]£©ÓëÁã¸ö»ò¸ü¶à×Ö·ûÆ¥Åä¡£[/font][font=Times New Roman] [/font]
[font=ËÎÌå]Îʺţ¨[/font]?[font=ËÎÌå]£©Óëµ¥¸ö×Ö·ûÆ¥Åä¡£[/font]
[font=ËÎÌå]̾ºÅ£¨[/font]![font=ËÎÌå]£©Òâζ×Ų»ÔÚÁбíÖС£[/font]
[font=ËÎÌå]Ó¢°÷·û£¨[/font]#[font=ËÎÌå]£©Òâζ×ŵ¥¸öÊý×Ö¡£[/font][color=windowtext][/color]
[/td][td=1,1,39%][font=ËÎÌå]°Ù·ÖºÅ£¨[/font][font=Times New Roman]%[/font][font=ËÎÌå]£©ÓëÁã¸ö»ò¸ü¶à×Ö·ûÆ¥Åä¡£[/font][font=Times New Roman] [/font]
[font=ËÎÌå]Ï»®Ïߣ¨[/font]_[font=ËÎÌå]£©Óëµ¥¸ö×Ö·ûÆ¥Åä¡£[/font]
[font=ËÎÌå]ÉϲåÈë·û£¨[/font]^[font=ËÎÌå]£©Òâζ×Ų»ÔÚÁбíÖС£[/font]
[font=ËÎÌå]ûÓÐÓëÓ¢°÷·û£¨[/font]#[font=ËÎÌå]£©¶ÔÓ¦µÄ×Ö·û¡£[/font]
[/td][/tr][tr][td=1,1,26%][font=Times New Roman]TOP[size=12pt][/font]
[/size][/td][td=1,1,33%][font=ËÎÌå]Èç¹ûÓÐÒ»¸ö[/font][font=Times New Roman] ORDER BY [/font][font=ËÎÌå]×Ӿ䣬×Ô¶¯°üº¬²ã´Î¡£[/font][size=12pt]
[/size][/td][td=1,1,39%][font=Times New Roman]SQL Server 6.5 [/font][font=ËÎÌå]²»Ö§³Ö¡£[/font][font=Times New Roman] [/font]
SQL Server 7.0 [font=ËÎÌå]ÐèÒªÒ»¸öÃ÷È·µÄ[/font] WITH TIES [font=ËÎÌå]×Ӿ䡣[/font]
[/td][/tr][tr][td=1,1,26%][font=Times New Roman]CREATE INDEX[size=12pt][/font]
[/size][/td][td=1,1,33%][font=ËÎÌå]ÔÊÐí´´½¨ÉýÐòºÍ½µÐòË÷Òý¡£[/font][font=Times New Roman] [/font]
[font=ËÎÌå]ÔÊÐíÉùÃ÷Ö÷¼ü£¬Ã»ÓÐ[/font] Null [font=ËÎÌå]Öµ£¬²¢ÇÒºöÂÔ[/font] Null [font=ËÎÌå]Öµ¡£[/font]
[/td][td=1,1,39%][font=Times New Roman][size=12pt][/font]
[/size][/td][/tr][tr][td=1,1,26%][font=Times New Roman]DROP INDEX[/font]
[/td][td=1,1,33%][font=ËÎÌå]Óï·¨ÊÇ£º[/font][font=Times New Roman] [/font]
Drop Index ON
[/td][td=1,1,39%][font=ËÎÌå]Óï·¨ÊÇ£º[/font][font=Times New Roman] [/font]
Drop Index
,
[/td][/tr][tr][td=1,1,26%][font=Times New Roman]DISTINCTROW[/font]
[/td][td=1,1,33%][font=ËÎÌå]Ö§³Ö£¨ÔÊÐíÑ¡Ôñµ¥¸ö¼Ç¼£©¡£[/font]
[/td][td=1,1,39%][font=ËÎÌå]²»Ö§³Ö¡£[/font]
[/td][/tr][tr][td=1,1,26%][font=Times New Roman]OWNERACCESS[/font]
[/td][td=1,1,33%][font=ËÎÌå]Ö§³Ö£¨ÔÚÖ´ÐÐʱ¿ØÖÆÐí¿ÉȨ£©¡£[/font]
[/td][td=1,1,39%][font=ËÎÌå]²»Ö§³Ö¡£[/font]
[/td][/tr][tr][td=1,1,26%][font=Times New Roman]Table in UNION[/font]
[/td][td=1,1,33%][font=ËÎÌå]Ö§³Ö£¨ÔÊÐíʹÓÃÏÂÁÐÓï·¨Ö¸¶¨±í£º[/font][font=Times New Roman] [/font]
TABLE
[/td][td=1,1,39%][font=ËÎÌå]²»Ö§³Ö¡£[/font]
[/td][/tr][tr][td=1,1,26%][font=Times New Roman]ORDER BY in Unions[/font]
[/td][td=1,1,33%][font=ËÎÌå]Ö§³Ö¡£ÔÊÐíͨ¹ýÁªºÏ²éѯÖеÄ×Ó¾äʵÏÖ¶àÖÖÅÅÐò¡£[/font]
[/td][td=1,1,39%][font=ËÎÌå]Ö§³Ö¡£ÔÊÐíͨ¹ýÓï¾äĩβµÄ×Ó¾äʵÏÖÒ»ÖÖÅÅÐò¡£[/font]
[/td][/tr][tr][td=1,1,26%][font=Times New Roman]TRANSFORM[/font]
[/td][td=1,1,33%][font=ËÎÌå]Ö§³Ö¡£ÓÃÓÚ½»²æ±í²éѯ¡£[/font]
[/td][td=1,1,39%][font=ËÎÌå]²»Ö§³Ö¡£[/font]
[/td][/tr][tr][td=1,1,26%][font=Times New Roman]PARAMETERS[/font]
[/td][td=1,1,33%][font=ËÎÌå]Ö§³Ö£¨ÔÚ[/font][font=Times New Roman] SQL [/font][font=ËÎÌå]ÖмǼ£©¡£[/font]
[/td][td=1,1,39%][font=ËÎÌå]²»Ö§³Ö¡£[/font]
[/td][/tr][/table][font=Times New Roman][/font]
[font=ËÎÌå]ÒÔ[/font]northwind[font=ËÎÌå]Êý¾Ý¿âΪÀý£¬ÈôÒªµÃµ½Ïàͬ²éѯ½á¹û£¬[/font]SQL[font=ËÎÌå]Óï¾ä×÷ÏàÓ¦±ä»¯[/font][font=ËÎÌå]¡£[/font]
Access[font=ËÎÌå]£º[/font]
SELECT * FROM Products where productname like 'c*';
SELECT * FROM Products where productname like 'c?ang';
SQL Server:
SELECT * FROM Products WHERE productname LIKE 'c%'
SELECT * FROM Products WHERE productname LIKE 'c_ang'
[font=ËÎÌå]ÔÚ¿ª·¢¹ý³ÌÖÐÓÈÆäÐèҪעÒâͨÅä·ûµÄ±ä»¯¡£[/font]
ÎÄÕÂÆÀÂÛ

¹²ÓÐ 0 ÌõÆÀÂÛ