SQLÖ®COLLATE ×Ó¾ä ÅÅÐò¹æÔò
COLLATE ÊÇÒ»¸ö×Ӿ䣬¿ÉÓ¦ÓÃÓÚÊý¾Ý¿â¶¨Òå»òÁж¨ÒåÒÔ¶¨ÒåÅÅÐò¹æÔò£¬»òÓ¦ÓÃÓÚ×Ö·û´®±í´ïʽÒÔÓ¦ÓÃÅÅÐò¹æÔòת»»¡£
Óï·¨
COLLATE { <collation_name> | database_default }
<collation_name> :: =
{ Windows_collation_name } | { SQL_collation_name }
²ÎÊý
collation_name
Ó¦ÓÃÓÚ±í´ïʽ¡¢Áж¨Òå»òÊý¾Ý¿â¶¨ÒåµÄÅÅÐò¹æÔòµÄÃû³Æ¡£collation_name ¿ÉÒÔÖ»ÊÇÖ¸¶¨µÄ
Windows_collation_name »ò SQL_collation_name ¡£collation_name ±ØÐëÊÇÎÄ×ÖÖµ¡£
collation_name ²»ÄÜÓñäÁ¿»ò±í´ïʽ±íʾ¡£
Windows_collation_name ÊÇÓÃÓÚ Windows ÅÅÐò¹æÔò
Ãû³ÆµÄÅÅÐò¹æÔòÃû³Æ¡£
SQL_collation_name ÊÇÓÃÓÚ SQL ÅÅÐò¹æÔò
Ãû³ÆµÄÅÅÐò¹æÔòÃû³Æ¡£
database_default
ʹ COLLATE ×Ó¾ä¼Ì³Ðµ±Ç°Êý¾Ý¿âµÄÅÅÐò¹æÔò¡£
ÏÂÃæ˵Ã÷ÏÂʲôÊÇÅÅÐò¹æÔò£¬SQL Server 2005 ÌṩÁËÁ½×éÅÅÐò¹æÔò£ºWindows ÅÅÐò¹æÔòºÍ SQL ÅÅÐò¹æÔò¡£
Windows ÅÅÐò¹æÔò
Windows ÅÅÐò¹æÔòÊÇΪ SQL Server ¶¨ÒåµÄÅÅÐò¹æÔò£¬ÓÃÀ´Ö§³Ö Windows ÇøÓòÉèÖá£Windows ÇøÓòÉèÖõÄÊýÁ¿±È
SQL Server Windows ÅÅÐò¹æÔò¶à¡£Windows
ÇøÓòÉèÖÃÃû³ÆÊÇ»ùÓÚÓïÑԺ͵ØÓòµÄ¡£ÀýÈ磬·¨Ó¼ÓÄô󣩡£²»¹ý£¬Èô¸ÉÖÖÓïÑÔ¿ÉÒÔ¹²ÏíͨÓõÄ×Öĸ±íºÍ¹æÔò½øÐÐ×Ö·ûµÄÅÅÐòºÍ±È½Ï¡£ÁíÍ⣬Windows
ÇøÓòÉèÖû¹Ö¸¶¨ SQL Server Windows
ÅÅÐò¹æÔò²»¾ßÓеÄÊôÐÔ£¬Èç»õ±Ò¡¢ÈÕÆÚºÍʱ¼ä¸ñʽ¡£ÒòΪ²»Í¬µÄ¹ú¼ÒºÍµØÇø£¨±ÈÈçÓ¢¹úºÍÃÀ¹ú£©Ê¹Óò»Í¬µÄ»õ±Ò¡¢ÈÕÆÚºÍʱ¼ä¸ñʽ£¬Òò´ËËüÃÇÐèÒª²»Í¬µÄ
Windows ÅÅÐò¹æÔò¡£µ«ÓÉÓÚËüÃÇʹÓÃÏàͬµÄ×Öĸ±íºÍ¹æÔòÀ´¶Ô×Ö·û½øÐÐÅÅÐòºÍ±È½Ï£¬Òò¶ø¿ÉÒÔʹÓÃÏàͬµÄ SQL Server ÅÅÐò¹æÔò¡£
SQL ÅÅÐò¹æÔò
SQL ÅÅÐò¹æÔòÊÇÒ»ÖÖ¼æÈÝÐÔÑ¡ÏÓÃÀ´Æ¥Åä SQL Server
ÔçÆÚ°æ±¾ËùÖ¸¶¨µÄ´úÂëÒ³ºÅºÍÅÅÐò˳ÐòµÄ¹«ÓÃ×éºÏÊôÐÔ¡£Ðí¶àÅÅÐò¹æÔò¶¼Ö§³Öͨ¹ýºó׺ָ¶¨Çø·Ö´óСд¡¢ÖØÒô¡¢¼ÙÃû¡¢È«°ë½Ç£¬µ«²»È«ÊÇÕâÑù¡£ÔÚ SQL
Server 2005 ÖУ¬Ó¦ÓÅÏȲÉÓà Windows ÅÅÐò¹æÔò¡£ÌرðÊÇÔÚÊý¾Ý¿âÖÐ Unicode ÁÐÓë·Ç Unicode
Áж¼´æÔÚʱ¡£Windows ÅÅÐò¹æÔòʵ¼ÊÉÏ¶Ô Unicode Êý¾ÝºÍ·Ç Unicode Êý¾Ý¶¼Ó¦ÓÃÁË»ùÓÚ Unicode µÄÅÅÐò¹æÔò¡£Õâ±íʾ
SQL Server ÔÚÄÚ²¿½«·Ç Unicode Êý¾Ýת»¯Îª Unicode À´Ö´ÐбȽϲÙ×÷¡£Õâ±£Ö¤ÁË SQL Server
ÖÐËùÓÐÊý¾ÝÀàÐ͵ÄÒ»ÖÂÐÔ£¬Ò²Ê¹¿ª·¢ÈËÔ±Äܹ»Ê¹Óà SQL Server ÖеÄÅÅÐò
Ïà¹ØÎĵµ£º
×î½üÒ»Ö±ÔÚѧϰSQL serverµÄÄÚÈÝ¡£×òÌ쿼ÁËÒ»ÏÂÊÔ¡£¸Ð¾õÕæµÄÊDz»ÈÝÒ×°¡¡£ÌرðÊÇһЩ¸´ÔӵIJéѯ¡£¸ãµÃÎÒÍ·»èÄÔÕ͵ġ£²»¹ýÒ²ÊÇÓÉÓÚ×Ô¼ºµÄ֪ʶÕÆÎյĻ¹²»¹»Ôúʵ°¡¡£ËùÒÔ½ñÌ츴ϰÁËÒ»ÏÂT-SQlÓï¾äµÄÔöɾ¸Ä²é¡£·¢ÏÖµÄÈ·ÊÇÓкܶ඼Íü¼ÇÁË¡£ÏÖÔڰѽá¹ûд³öÀ´¡£ÒÔºó¿É²»ÒªÍüÁËѽ¡£
--SQLÓï¾ä¸´Ï° --Ò»,²åÈëinsertÓï¾ä --1,ins ......
sqlÓï¾ä£¬È¡³ö±íAÖеĵÚ31Ìõµ½40Ìõ¼Ç¼£¨±íAÒÔ×Ô¶¯Ôö³¤µÄID×öÖ÷¼ü£¬×¢ÒâID¿ÉÄÜÊDz»Á¬ÐøµÄ£©
-->select top 10 * from a where id not in (select top 30 id from a order by id) order by id
²éѯǰʮÌõ¼Ç¼£¬µ«Ìõ¼þÊÇ£ºID²»ÔÚÇ°ÈýÊ®ÌõµÄIDÀïÃæ
-->select top 10 * from (select top 40 ......
½ñÌìÔÚÏîÄ¿ÖÐÓÐÒ»ÎÊÌ⣬ÔÚÍøÉϲéѯÁËcaseµÄÓ÷¨£¬Ìû³öÀ´ºÍ´ó¼Ò·ÖÏíÏ¡£
ÎÊÌâÃèÊö£ºÔÚÒ»ÕűíÖÐÓÐÒ»×Ö¶ÎbitÀàÐÍ£¬±íʾ´ËÌõÊý¾ÝÊÇ·ñ±»Ëø¶¨£¬ÔÚÒ³ÃæÉÏÓÐÒ»°´Å¥ÊǶԴËÌõÊý¾Ý½øÐÐËø¶¨ºÍ½âËøµÄ£¬Ñ¡ÔñÒ³ÃæÖеÄÊý¾Ý£¬µã»÷Õâ¸ö°´Å¥£¬Èç¹ûÕâÌõÊý¾ÝÊÇËø¶¨µÄ£¬¾Í½âËø£»Èç¹ûÊÇδ˵¶¨µÄ¾ÍËø¶¨£¬ÕâÑù¾ÍÓÃÒ»ÌõÓï¾äÀ´ÊµÏÖ¡£ºóÀ´Ï ......
ÔÚÁгö±íÖÐËùÓÐ×Ö¶ÎÃûµÄʱºò£¬Óõ½ÁËÕâÑùÒ»¸öSQLº¯Êý£ºobject_id
ÕâÀïÎÒ½«Æä×÷ÓÃÓëÓ÷¨ÁгöÀ´£¬ºÃÈôó¼ÒÃ÷°×£º
OBJECT_ID£º
·µ»ØÊý¾Ý¿â¶ÔÏó±êʶºÅ¡£
Óï·¨
OBJECT_ID ( 'object' )
²ÎÊý
'object'
ҪʹÓõĶÔÏó¡£object µÄÊý¾ÝÀàÐÍΪ char »ò nchar¡£Èç¹û object µÄÊý¾ÝÀàÐÍÊÇ char£¬ÄÇôÒþÐÔ½«Æäת»»³É ncha ......
shopxpÍøÉϹºÎïϵͳ v7.4´æÔÚSql×¢È멶´¡£
ÎÊÌâÎļþ£ºxpCatalog_xpDesc.asp£¬xpCatalog_xpsmall_Desc.asp
ÎÊÌâ´úÂ룺
<%
dim shopxpbe_id, anclassname, shopxpse_id, nclassname
dim totalPut
dim CurrentPage, TotalPages
if request("shopxpbe_id")<>"" then
shopxpbe_id=request("shopxpbe_id")
e ......