Éî¶È¶Ô±ÈOracleÓëSQL Server——µÚÒ»²¿·Ö
²Ù×÷ϵͳµÄÖ§³Ö °æ±¾ºÍ·¢Ðаæ ʵÀý¡¢Êý¾Ý¿âºÍ±í¿Õ¼ä ʵÀýÃûºÍSID ϵͳÊý¾Ý¿âºÍϵͳ±í¿Õ¼ä
Ò»°ãµÄ¹«Ë¾Í¨³£»áÔÚËûÃǵÄÐÅϢϵͳ¼Ü¹¹ÖÐÒýÈë¶àÖÖÊý¾Ý¿âƽ̨£¬Í¬Ê±ÒýÈëÈýµ½ËÄÖÖ²»Í¬µÄRDBMS½â¾ö·½°¸µÄÖдóÐ͹«Ë¾Ò²²¢²»ÉÙ¼û£¬µ±È»ÕâЩ¹«Ë¾ÀïÃæµÄDBAÃÇͨ³£Ò²ÐèҪͬʱӵÓйÜÀí¶àÖÖ²»Í¬Æ½Ì¨µÄ¼¼ÄÜÁË¡£
Ö»ÔÚÒ»ÖÖƽ̨ÉÏÕ¹¿ª¹¤×÷µÄÊý¾Ý¿âר¼ÒÃÇҲͨ³£»áÆÚ´ý×ÅÔÚËûÃǵÄÏÂÒ»·Ý¹¤×÷ÖÐÄÜѧµ½µã²»Ò»ÑùµÄ¶«Î÷£¬ÄÇЩÓÐÓÂÆøµÄÈËÃÇÔòÔ¸Ò⻨ʱ¼ä¡¢½ðÇ®ºÍ¾«Á¦È¥Ñ§Ï°ÐµĶ«Î÷£¬Ò²ÓÐÆäËûÒòΪ»»ÁËй«Ë¾»òÕßÊÇΪÁËÕÒÐµĹ¤×÷¶øȥѧϰеÄϵͳµÄÈËÃÇ£¬ÎãÓ¹ÖÃÒɵÄÒ»µã¾ÍÊǹ«Ë¾ÀÏ°åºÍÈËÁ¦×¨¼ÒÃÇ»á¸ü¼ÓÇàíùÓÚÄÇЩӵÓжà¸öÁìÓò¾ÑéµÄÇóÖ°Õß¡£
ÒÀÎÒ¸öÈ˵ľÑéÀ´¿´£¬ÔÚѧϰһ¸öеÄÊý¾Ýƽ̨µÄʱºò£¬×îºÃµÄ·½·¨¾ÍÊÇÔÚеĻ·¾³ÖÐÈ¥·¢ÏÖÄÇЩÄãÒÑÖªµÄ¶«Î÷£¬ÕâÑùѧϰÆðÀ´»á¼òµ¥ºÜ¶à¡£µ±È»£¬µ±ÖÐÒ²»áÓöµ½Ò»Ð©È«ÐµĸÅÄîÐèҪȥѧϰ£¬»òÕßÊÇÍüµôһЩÄãÏÖÔÚÒÑÖªµÄ¸ÅÄµ«²»¹ÜÔõô˵Äã²»ÊÇ´ÓÁ㿪ʼµÄ¡£±ÈÈç˵һ¸ö×öSQL Server¿ª·¢ÈËÔ±ÔÚҪдOracle´æ´¢¹ý³ÌµÄʱºò¿ÉÄÜ»áÏÈÈ¥ÕÒÄÇЩÄÚÖõĺ¯ÊýÈ»ºó±È½ÏËüÃÇÖ®¼ä²»Í¬µã£¬ËýÒ²¿ÉÄÜ»áÈ¥±È½Ï±äÁ¿ÉùÃ÷ÒÔ¼°´íÎó´¦ÀíµÄÒìͬ¡£
±¾ÏµÁÐÎÄÕÂÖÐÎÒ½«³¢ÊÔ¶ÔMicrosoft SQL ServerºÍOracle RDBMS£¨ÒÔ10g¼°ÒÔºóµÄ°æ±¾ÎªÖ÷£©½øÐÐÒ»¸öÉîÈëµÄ±È½Ï¡£ÎÒ»áÖ÷Òª¼¯ÖÐÓÚÕâÁ½ÖÖÊý¾Ý¿âÖ®¼ä¼Ü¹¹ÉϵıȽϣ¬µ±È»²»ÒªÆÚÍûÎÒ»á¸øÄãÒ»¸öÏ꾡µÄ±È½ÏÇåµ¥£¬µ«ÊÇÎһᾡÎÒËùÄܵÄÈÃÄã¿´ÇåÕâÁ½ÖÖµ±½ñÊÀÉÏÓ¦ÓÃ×î¹ãµÄÊý¾Ý¿âÖ®¼äµÄÏàͬºÍÏàÒìÖ®´¦¡£±¾ÎÄÊÇÒÔÒ»¸öSQL Server DBAµÄ½Ç¶ÈÈ¥¹¹Ë¼ºÍд×÷µÄ£¬²»¹ýÏàÐÅÕâ¶ÔOracleר¼ÒÃÅÁ˽âSQL ServerÕâÒ»ÃæÒ²ÊǺÜÓвο¼¼ÛÖµµÄ¡£
·Ï»°ÉÙ˵£¬¿ª¹¤°É¡£
²Ù×÷ϵͳµÄÖ§³Ö
Microsoft SQL ServerÏòÀ´¶¼´ÓÊôÓÚWindows´ó¼Ò×åÖеÄÒ»Ô±£¬ÒªÈÃMicrosoft·¢²¼Ò»¸öÖ§³ÖÆäËü²Ù×÷ϵͳ°æ±¾µÄ¿ÉÄÜÐÔµ±È»ÊÇС֮ÓÖСµÄÁË¡£µ±Ç°À´ËµSQL Server¿ÉÒÔÔÚXP¡¢Vista¡¢Windows Server 2000¡¢2003¡¢2008ÉÏÔËÐУ¬Í¬Ê±Ò²ÓÐÕë¶ÔÓÚ32λºÍ64λ°æ±¾WindowsµÄÊý¾Ý¿â°æ±¾¡£
¶ÔOracleÀ´Ëµ£¬ËüÖ§³Ö¶àÖÖ²»Í¬µÄ²Ù×÷ϵͳƽ̨£¬°üÀ¨Windows£¨32λºÍ64룩£¬ÁíÍ⻹ÓÐÖ§³ÖLinuxºÍ²»Í¬·ÖÖ§µÄUnix£¨Solaris¡¢HP-UX¡¢AIXµÈµÈ£©
°æ±¾ºÍ·¢Ðаæ
ÔÚ±¾Ð´×÷ʱ£¬MicrosoftÊý¾Ý¿â²úÆ·µÄ×îа汾ÊÇSQL Server 2008£¬¼´½«ÍƳöµÄÏÂÒ»°æ±¾ÊÇSQL Server 2008 R2£¬ÏÖÔÚÒѾÔÚCTP½×¶ÎÁË£¬ËüµÄÉÏÒ»¸ö°æ±¾£¬SQL Server 2005£¬Ïà¶ÔÓÚÔÙ֮ǰµÄSQL Server 2000µÄÒ»¸ö´óÉý¼¶¡£²»¹ý¶ÔºÜ¶à¹«Ë¾À´ËµSQL Server 2005»¹ÊÇÓеãУ
Ïà¹ØÎĵµ£º
SQL³£Óú¯Êý£º
1. ASCII()£º·µ»Ø×Ö·û´®×î×ó¶Ë×Ö·ûµÄASCIIÂë¡£
2. CHAR()£º½«ASCIIת»»³É×Ö·û¡£(0~255)
3. LOWER()ºÍUPPER()¡£
4. STR()£º°ÑÊýÖµÐÍÊý¾Ýת»»Îª×Ö·ûÐÍÊý¾Ý
SRT(<float_expression>[,length[,<decimal>]])
LTRIM()°Ñ×Ö·û´®Í·²¿¿Õ¸ñÈ¥µô£¬RTRIM()°Ñ×Ö·û´®Î²¿Õ¸ñÈ¥µô¡£
È¡× ......
http://www.builder.com.cn/2007/1027/583048.shtml
ÔÚphp3.0ÒÔÉÏ°æ±¾ÖУ¬phpÄÚÖÃÁ˼¸ºõÄ¿Ç°ËùÓеÄÊý¾Ý¿â´¦Àíº¯Êý£¬°üÀ¨Oracle;ÔÚ±¾ÎÄÖÐÎÒÃÇͨ¹ýÒ»¸öʵÀýÀ´½éÉÜÁËÈçºÎʹÓÃÕâЩº¯ÊýÀ´²Ù×÷OracleÊý¾Ý¿â¡£
PHPÌṩÁË2´óÀàAPI(Ó¦ÓóÌÐò½Ó¿Ú)À´²Ù×÷OracleÊý¾Ý¿â¡£Ò»¸öÊDZê×¼µÄOracle´¦Àíº¯Êý(ORA) ÁíÒ»¸öÊÇOracle 8µ÷Óýӿں¯ ......
Oracle³£Ó÷ÖÎöº¯Êý
ROW_NUMBER
·µ»ØÓÐÐò×éÖÐÒ»ÐеÄÆ«ÒÆÁ¿£¬´Ó¶ø¿ÉÓÃÓÚ°´Ìض¨±ê×¼ÅÅÐòµÄÐкÅ
row_number() over(partition by ... order by ...)
RANK
¸ù¾ÝORDER BY×Ó¾äÖбí´ïʽµÄÖµ£¬´Ó²éѯ·µ»ØµÄÿһÐУ¬¼ÆËãËüÃÇÓëÆäËüÐеÄÏà¶ÔλÖá£×éÄÚµÄÊý¾Ý°´ORDER BY×Ó¾äÅÅÐò£¬È»ºó¸øÿһÐи³Ò»¸öºÅ£¬´Ó¶øÐγÉÒ»¸öÐòÁУ¬¸ÃÐòÁ ......
OracleÊý¾Ý¿â·þÎñÆ÷ÓÉÁ½²¿·Ö×é³É£¬Ò»²¿·ÖÊÇORACLEÊý¾Ý¿â£¬Ò»²¿·ÖÊÇORACLEʵÀý¡£ORACLEÊý¾Ý¿â¾ÍÊÇ´æ´¢ÔÚ´ÅÅÌÉϵÄORACLEÊý¾ÝÎļþ¡¢ÈÕÖ¾ÎļþºÍ¿ØÖÆÎļþ¡£ÊµÀýÊÇÓÃÀ´¶ÔÊý¾Ý¿â½øÐвÙ×÷¡¢¹ÜÀíµÄ¡£ÊµÀýÓÉһϵÁнø³ÌºÍÄÚ´æ×é³É¡£
Æô¶¯Êý¾Ý¿âµÄʱºòÏÈÔÚÄÚ´æ·ÖÅäÒ»¿éºÜ´óµÄ´æ´¢¿Õ¼ä£¬È»ºóÆô¶¯ORACLEÊý¾Ý¿âÔËÐÐʱÐèÒªµÄһϵÁнø³Ì£¬¼´ ......