SQL Server 2000 Êý¾Ý¿âͬ²½
SQL Server 2000 Êý¾Ý¿âͬ²½ÅäÖõÄÔÀí
¸´ÖƵĸÅÄî
Microsoft? SQL Server? 2000 µÄ¸´ÖÆÊÇÔÚÊý¾Ý¿âÖ®¼ä¶ÔÊý¾ÝºÍÊý¾Ý¿â¶ÔÏó½øÐи´ÖÆ
ºÍ·Ö·¢²¢½øÐÐͬ²½ÒÔÈ·±£ÆäÒ»ÖÂÐÔµÄÒ»×é¼¼Êõ¡£
ʹÓø´ÖÆ¿ÉÒÔ½«Êý¾Ý·Ö·¢µ½²»Í¬Î»Öã¬Í¨¹ý¾ÖÓòÍø¡¢Ê¹Óò¦ºÅÁ¬½Ó¡¢Í¨¹ý Internet ·Ö
·¢¸øÔ¶³Ì»òÒƶ¯Óû§¡£¸´ÖÆ»¹Äܹ»Ê¹Óû§Ìá¸ßÓ¦ÓóÌÐòÐÔÄÜ£¬¸ù¾ÝÊý¾ÝµÄʹÓ÷½Ê½ÎïÀí
·Ö¸ôÊý¾Ý£¨ÀýÈ磬½«Áª»úÊÂÎñ´¦Àí (OLTP) ºÍ¾ö²ßÖ§³Öϵͳ·Ö¿ª£©£¬»òÕß¿çÔ½¶à¸ö·þÎñ
Æ÷·Ö²¼Êý¾Ý¿â´¦Àí¡£
---------------------------------------------------------------------------
SQL¸´ÖƵĻù±¾ÔªËØ°üÀ¨
·¢²¼·þÎñÆ÷¡¢¶©ÔÄ·þÎñÆ÷¡¢·Ö·¢·þÎñÆ÷¡¢·¢²¼¡¢ÏîÄ¿
·¢²¼·þÎñÆ÷
·¢²¼·þÎñÆ÷ÊÇÌṩÊý¾ÝÒԱ㸴ÖƵ½ÆäËü·þÎñÆ÷µÄ·þÎñÆ÷¡£·¢²¼·þÎñÆ÷¿ÉÒÔ¾ßÓÐÒ»¸ö»ò¶à¸ö
·¢²¼£¬Ã¿¸ö·¢²¼´ú±íÒ»×éÂß¼Ïà¹ØµÄÊý¾Ý¡£³ýÁËÖ¸¶¨ÆäÖÐÄÄЩÊý¾ÝÐèÒª¸´ÖÆÖ®Í⣬·¢²¼·þ
ÎñÆ÷»¹¼ì²âÊÂÎñ¸´ÖÆÆڼ䷢Éú¸ü¸ÄµÄÊý¾Ý²¢Î¬»¤ÓйشËÕ¾µãÉÏËùÓз¢²¼µÄÐÅÏ¢¡£
·Ö·¢·þÎñÆ÷
·Ö·¢·þÎñÆ÷ÊÇ×÷Ϊ·Ö·¢Êý¾Ý¿âËÞÖ÷²¢´æ´¢ÀúÊ·Êý¾ÝºÍ/»òÊÂÎñÒÔ¼°ÔªÊý¾ÝµÄ·þÎñÆ÷¡£·Ö·¢
·þÎñÆ÷µÄ½ÇÉ«¸ù¾ÝÖ´Ðеĸ´ÖÆÀàÐͶø²»Í¬¡£Óйظü¶àÐÅÏ¢£¬Çë²Î¼û¸´ÖÆÀàÐÍ¡£
Ô¶³Ì·Ö·¢·þÎñÆ÷ÊǶÀÁ¢ÓÚ·¢²¼·þÎñÆ÷²¢ÅäÖÃΪ¸´ÖƵķַ¢·þÎñÆ÷µÄ·þÎñÆ÷¡£±¾µØ·Ö·¢·þÎñ
Æ÷ÊǼÈÅäÖÃΪ¸´ÖƵķ¢²¼·þÎñÆ÷ÓÖÅäÖÃΪ¸´ÖƵķַ¢·þÎñÆ÷µÄ·þÎñÆ÷¡£
¶©ÔÄ·þÎñÆ÷
¶©ÔÄ·þÎñÆ÷ÊǽÓÊÕ¸´ÖÆÊý¾ÝµÄ·þÎñÆ÷¡£¶©ÔÄ·þÎñÆ÷¶©ÔĵÄÊÇ·¢²¼¶ø²»ÊÇ·¢²¼ÖзÖÀëµÄÏîÄ¿£»
²¢ÇÒ¶©ÔÄ·þÎñÆ÷Ö»¶©ÔÄÆäÐèÒªµÄ·¢²¼£¬¶ø²»ÊÇ·¢²¼·þÎñÆ÷ÉÏËùÓпÉÓõķ¢²¼¡£¸ù¾Ý¸´ÖƵÄÀà
ÐͺÍËùÑ¡ÔñµÄ¸´ÖÆÑ¡Ï¶©ÔÄ·þÎñÆ÷»¹¿ÉÒÔ½«Êý¾Ý¸ü¸Ä´«²¥»Ø·¢²¼·þÎñÆ÷»ò½«Êý¾ÝÖØз¢²¼
µ½ÆäËü¶©ÔÄ·þÎñÆ÷¡£
·¢²¼
·¢²¼ÊÇÒ»¸öÊý¾Ý¿âÖеÄÒ»¸ö»ò¶à¸öÏîÄ¿µÄ¼¯ºÏ¡£ÕâÖÖ¶à¸öÏîÄ¿µÄ·Ö×éʹµÃÖ¸¶¨Âß¼Ïà¹ØµÄÒ»
×éÊý¾ÝºÍÊý¾Ý¿â¶ÔÏóÒÔÒ»Æð¸´ÖƱäµÃ¸üÈÝÒס£
씀ÏîÄ¿ÊÇÖ¸¶¨Òª¸´ÖƵÄÊý¾Ý±í¡¢Êý¾Ý·ÖÇø»òÊý¾Ý¿â¶ÔÏó¡£ÏîÄ¿¿ÉÒÔÊÇÍêÕûµÄ±í¡¢Ä³¼¸ÁУ¨Ê¹Óô¹
ֱɸѡ£©¡¢Ä³¼¸ÐУ¨Ê¹ÓÃˮƽɸѡ£©¡¢´æ´¢¹ý³Ì»òÊÓͼ¶¨Òå¡¢´æ´¢¹ý³ÌµÄÖ´ÐС¢ÊÓͼ¡¢Ë÷ÒýÊÓͼ
»òÓû§¶¨Ò庯Êý¡£
¶©ÔÄ
¶©ÔÄÊǶÔÊý¾Ý»òÊý¾Ý¿â¶ÔÏóµÄ¸´±¾µÄÇëÇ󡣶©ÔĶ¨Ò彫½ÓÊյķ¢²¼ºÍ½ÓÊÕµÄʱ¼ä¡¢µØµã¡£¶©ÔĵÄ
ͬ²½»òÊý¾Ý·Ö·¢¿ÉÒÔÓÉ·¢²¼·þÎñÆ÷£¨Ç¿Öƶ©ÔÄ£©»ò¶©ÔÄ·þÎñÆ÷£¨ÇëÇó¶©ÔÄ£©ÇëÇó¡£·¢²¼¿ÉÒÔÖ§³Ö
Ç¿Öƶ©ÔĺÍÇëÇó¶©ÔĵĻìºÏ¡£
-----------------------------------------------------------------------
Ïà¹ØÎĵµ£º
SQL ÖÐµÄ substring º¯ÊýÊÇÓÃÀ´×¥³öÒ»¸öÀ¸Î»×ÊÁÏÖеÄÆäÖÐÒ»²¿·Ö¡£Õâ¸öº¯ÊýµÄÃû³ÆÔÚ²»Í¬µÄ×ÊÁÏ¿âÖв»ÍêÈ«Ò»Ñù£º
MySQL: SUBSTR(), SUBSTRING()
Oracle: SUBSTR()
SQL Server: SUBSTRING()
×î³£Óõ½µÄ·½Ê½ÈçÏ (ÔÚÕâÀïÎÒÃÇÓÃSUBSTR()ΪÀý)£º
SUBSTR(str,pos): ÓÉ<str>ÖУ¬Ñ¡³öËùÓдӵÚ<pos>λÖÿªÊ¼ ......
pl/sql ÌṩÁËÇ¿´ó¶øÁé»îµÄÊÖ¶ÎÀ´²¶×½ºÍ´¦Àí³ÌÐò²úÉúµÄÒì³££¬´Ó¶øʹ oracle µÄÓû§Ô¶ÀëһЩÁîÈË·³ÄÕµÄ bug ¡£
pl/sql Òì³£´¦ÀíµÄ¸ÅÄîºÍÊõÓï
ÔÚ oracle ÖÐËùÓеĴíÎ󶼱»ÈÏΪÊDz»Ó¦¸Ã·¢ÉúµÄÒì³£¡£Ò»¸öÒì³£¿ÉÄÜÊÇÒÔÏ 3 ÖÖÇé¿öµÄÒ»ÖÖ£º
u ÓÉϵͳ²úÉúµÄ´íÎó£¨& ......
×°ÁËSQL2000ºó°²×°SQL2005,ËäȻʹÓñðÃû¼ÓÒÔÇø±ðÁË£¬µ«·¢ÏÖ2005ÖÐûÓпɹ©·ÃÎʵÄÀàËÆÆóÒµ¹ÜÀíÆ÷£¬Ò»Ê±³å¶¯£¬Ð¶ÁË2000£¬ÍêÕû°²×°ÁË2005£¬·¢ÏÖ»¹ÊÇûÓÐÆóÒµ¹ÜÀíÆ÷£¬ËÑË÷¹ýºó²Å·¢ÏÖÐèÒª°²×°SQLServer2005_SSMSEE.msi£¨¼´SQLServerManagerStudioExpressEdition£©£¬ËüÌṩÁËÀàËÆÆóÒµ¹ÜÀíÆ÷µÄͼÐλ¯²Ù×÷½çÃæ¡£
×°ºÃºó£¬SQL ......
¡¡Ç°Ì᣺°²×°sqlserver£¬°²×°outlook£¬outlookÒѾÕýÈ·ÅäÖá£
£¨1£©ÅäÖÃsqlserverµÄÆô¶¯Óû§ÎªÓòÓû§¡£sqlserverÆô¶¯Ä¬Èϵı¾µØÕË»§£¬±¾µØÕË»§Æô¶¯µÄ·þÎñÊÇÎÞ·¨Íê³ÉÓʼþµÄ·¢ËͽÓÊܹ¦Äܵġ£
ÅäÖÃÓòÓû§Æô¶¯£º´ò¿ª¿ØÖÆÃæ°åµÄ--¹ÜÀí¹¤¾ß--·þÎñ£¬ÕÒµ½sqlserver·þÎñ£¬²é¿´ÊôÐÔ¡£Ô ......
ÔÚijЩ³¡ºÏÏ£¬´æ´¢¹ý³Ì»ò´¥·¢Æ÷ÀïµÄSQLÓï¾äÐèÒª¶¯Ì¬Éú³É¡£OracleµÄDBMS_SQL°ü¿ÉÒÔÓÃÀ´Ö´Ðж¯Ì¬SQLÓï¾ä¡£±¾ÎÄͨ¹ýÒ»¸ö¼òµ¥µÄÀý×ÓÀ´Õ¹Ê¾ÈçºÎÀûÓÃDBMS_SQL°üÖ´Ðж¯Ì¬SQLÓï¾ä£º
DECLARE
v_cursor NUMBER;
v_stat NUMBER;
& ......