SQL Server 2008ÖеÄ9ÖÖÊý¾ÝÍÚ¾òËã·¨
ÕªÒª£ºSQL Server 2008ÖÐÌṩÁË9ÖÖ³£ÓõÄÊý¾ÝÍÚ¾òËã·¨£¬ÕâЩËã·¨ÓÃÔÚ²»Í¬Êý¾ÝÍÚ¾òµÄÓ¦Óó¡¾°Ï£¬±¾Îľ͸÷¸öËã·¨Öð¸ö·ÖÎöÌÖÂÛ¡£
±êÇ©£ºÊý¾ÝÍÚ¾òËã·¨ SQL Server 2008
1.¾ö²ßÊ÷Ëã·¨
¾ö²ßÊ÷£¬ÓÖ³ÆÅж¨Ê÷£¬ÊÇÒ»ÖÖÀàËƶþ²æÊ÷»ò¶à²æÊ÷µÄÊ÷½á¹¹¡£¾ö²ßÊ÷ÊÇÓÃÑù±¾µÄÊôÐÔ×÷Ϊ½áµã£¬ÓÃÊôÐÔµÄÈ¡Öµ×÷Ϊ·ÖÖ§£¬Ò²¾ÍÊÇÀàËÆÁ÷³ÌͼµÄ¹ý³Ì£¬ÆäÖÐÿ¸öÄÚ²¿½Úµã±íʾÔÚÒ»¸öÊôÐÔÉϵIJâÊÔ£¬Ã¿¸ö·ÖÖ§´ú±íÒ»¸ö²âÊÔÊä³ö£¬¶øÿ¸öÊ÷Ò¶½Úµã´ú±íÀà»òÀà·Ö²¼¡£Ëü¶Ô´óÁ¿Ñù±¾µÄÊôÐÔ½øÐзÖÎöºÍ¹éÄÉ¡£¸ù½áµãÊÇËùÓÐÑù±¾ÖÐÐÅÏ¢Á¿×î´óµÄÊôÐÔ£¬Öмä½áµãÊÇÒԸýáµãΪ¸ùµÄ×ÓÊ÷Ëù°üº¬µÄÑù±¾×Ó¼¯ÖÐÐÅÏ¢Á¿×î´óµÄÊôÐÔ£¬¾ö²ßÊ÷µÄÒ¶½áµãÊÇÑù±¾µÄÀà±ðÖµ¡£
´ÓÊ÷µÄ¸ù½áµã³ö·¢£¬½«²âÊÔÌõ¼þÓÃÓÚ¼ìÑé¼Ç¼£¬¸ù¾Ý²âÊÔ½á¹ûÑ¡ÔñÊʵ±µÄ·ÖÖ§£¬ÑØן÷ÖÖ§»òÕß´ïµ½ÁíÒ»¸öÄÚ²¿½áµã£¬Ê¹ÓÃеIJâÊÔÌõ¼þ»òÕß´ïµ½Ò»¸öÒ¶½áµã£¬Ò¶½áµãµÄÀà³ÆºÅ¾Í±»¸³Öµ¸ø¸Ã¼ìÑé¼Ç¼¡£¾ö²ßÊ÷µÄÿ¸ö·Ö֧ҪôÊÇÒ»¸öеľö²ß½Úµã£¬ÒªÃ´ÊÇÊ÷µÄ½á⣬³ÆΪҶ×Ó¡£ÔÚÑØמö²ßÊ÷´ÓÉϵ½Ï±éÀúµÄ¹ý³ÌÖУ¬ÔÚÿ¸ö½Úµã¶¼»áÓöµ½Ò»¸öÎÊÌ⣬¶Ôÿ¸ö½ÚµãÉÏÎÊÌâµÄ²»Í¬»Ø´ðµ¼Ö²»Í¬µÄ·ÖÖ§£¬×îºó»áµ½´ïÒ»¸öÒ¶×ӽڵ㡣Õâ¸ö¹ý³Ì¾ÍÊÇÀûÓþö²ßÊ÷½øÐзÖÀàµÄ¹ý³Ì¡£¾ö²ßÊ÷Ëã·¨ÄÜ´ÓÒ»¸ö»ò¶à¸öµÄÔ¤²â±äÁ¿ÖУ¬Õë¶ÔÀà±ðÒò±äÁ¿£¬Ô¤²â³ö¸öÀýµÄÇ÷ÊƱ仯¹Øϵ¡£
ÔÚSQL Server 2008ÖУ¬ÎÒÃÇ¿ÉÒÔͨ¹ýÍÚ¾òÄ£ÐͲ鿴Æ÷À´²é¿´¾ö²ßÊ÷Ä£ÐÍ¡£Èçͼ1Ëùʾ¡£
ÔÚͼ1ÖУ¬ÎÒÃÇ¿ÉÒÔ¿´µ½¾ö²ßÊ÷ÏÔʾÓÉһϵÁвð·Ö×é³É£¬×îÖØÒªµÄ²ð·ÖÓÉË㷨ȷ¶¨£¬Î»ÓÚ“È«²¿”½ÚµãÖв鿴Æ÷µÄ×ó²à¡£ÆäËû²ð·Ö³öÏÖÔÚÓҲࡣÒÀÀµ¹ØϵÍøÂçÏÔʾÁËÄ£ÐÍÖеÄÊäÈëÊôÐԺͿÉÔ¤²âÊôÐÔÖ®¼äµÄÒÀÀµ¹Øϵ¡£²¢ÄÜͨ¹ý»¬¿éÀ´É¸Ñ¡ÒÀÀµ¹Øϵǿ¶È¡£
2.¾ÛÀà·ÖÎöËã·¨
¾ÛÀà·ÖÎöËã·¨¾ÍÊǺâÁ¿¸öÌå¼äµÄÏàËƶȣ¬ÊÇÒÀ¾Ý¸öÌåµÄÊý¾ÝµãÔÚ¼¸ºÎ¿Õ¼äµÄ¾àÀëÀ´Åжϵģ¬¾àÀëÔ½½ü£¬¾ÍÔ½ÏàËÆ£¬¾ÍÔ½ÈÝÒ×¹éΪһÀà¡£ÔÚ×î³õ¶¨Òå·ÖÀàºó£¬Ëã·¨½«Í¨¹ý¼ÆËãÈ·¶¨·ÖÀà±íʾµã·Ö×éÇé¿öµÄÊʺϳ̶ȣ¬È»ºó³¢ÊÔÖØж¨ÒåÕâЩ·Ö×éÒÔ´´½¨¿ÉÒÔ¸üºÃµØ±íʾÊý¾ÝµÄ·ÖÀà¡£¸ÃËã·¨½«Ñ»·Ö´Ðд˹ý³Ì£¬Ö±µ½Ëü²»ÄÜÔÙͨ¹ýÖØж¨Òå·ÖÀàÀ´¸Ä½ø½á¹ûΪֹ¡£¼òµ¥µÃ˵£¬¾ÛÀà¾ÍÊǽ«Êý¾Ý¶ÔÏóµÄ¼¯ºÏ·Ö×é³ÉΪÓÉÀàËƵĶÔÏó×é³ÉµÄ¶à¸öÀàµÄ¹ý³Ì¡£¾ÛÀàÓÃÔÚÉÌÎñ·½ÃæµÄ¿Í»§·ÖÎöÖУ¬¿ÉÒÔ´Ó¿Í»§¿âÖз¢ÏÖ²»Í¬µÄ¿Í»§Èº£¬²¢·ÖÎö²»Í¬¿Í»§ÈºµÄÐÐΪģʽ¡£
ÔÚSQL Server 2008ÖУ¬ÎÒÃÇ¿ÉÒÔͨ¹ýÍÚ¾òÄ£ÐͲ鿴Æ÷À´²é¿´¾ÛÀà·ÖÎöÄ£ÐÍ¡£Èçͼ2Ëùʾ¡£
ÔÚͼ2ÖУ¬·ÖÀà¹Øϵͼ±íÏÖ¸öÀà¼ä¹ØÁªÐÔµÄÇ¿Èõ¡£·ÖÀàÆÊÃæͼÁ˽
Ïà¹ØÎĵµ£º
Ò»¡¢±í½á¹¹²éѯ
SELECT TOP (100) PERCENT a.name AS zdm,COLUMNPROPERTY(a.id, a.name, 'IsIdentity') AS bs ,
CASE WHEN EXISTS (SELECT 1 from dbo.sysindexes si INNER JOIN dbo.sysindexkeys sik ON si.id = sik.id
AND si.indid = sik.indid INNER JOIN dbo.syscolumns sc ON sc.id = sik.id AND sc. ......
BEGIN TRANSACTION--¿ªÊ¼ÊÂÎñ
DECLARE @errorSun INT --¶¨Òå´íÎó¼ÆÊýÆ÷
SET @errorSun=0 --û´íΪ0
UPDATE a SET id=232 WHERE a=1 --ÊÂÎñ²Ù×÷SQLÓï¾ä
SET @errorSun=@errorSun+@@ERROR --ÀÛ¼ÆÊÇ·ñÓдí
UPDATE aa SET id=2 WHERE a=1 --ÊÂÎñ²Ù×÷SQLÓï¾ä
SET @errorSun=@errorSun+@@ERROR --ÀÛ¼ÆÊÇ·ñÓдí
I ......
==============================================
µÚ01½²: Chapter 00--Oracle 11g SQL Fundamentals Training Introduction
ÔÚÏß¹Û¿´£º http://www.boobooke.com/v/bbk2003
ÊÓƵÏÂÔØ£º http://www.boobooke.com/v/bbk2003.zip
µÚ02½²: Chapter 00--Oracle 11g SQL Fundamentals Training Introduction ......
MS SQL SERVER 2005È«ÎÄË÷Òýѧϰ±Ê¼ÇÒ»
ÏÈÁ˽âÒ»ÏÂÈ«ÎÄË÷ÒýÊÇÈçºÎ´´½¨ºÍʹÓõÄ
´´½¨È«ÎÄË÷Òý:
ÔÚMS SQL SERVER 2005Àï,È«ÎÄË÷ÒýÊÇÒ»¸öµ¥¶ÀµÄ·þÎñÏî,ĬÈÏÊÇÆô¶¯µÄ,µ«ÊÇûÓÐÔÊÐíÊý¾Ý¿âÆôÓÃÈ«ÎÄË÷Òý,Èç¹ûÒ ......