Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

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ÖУ¬·ÖÀà¹Øϵͼ±íÏÖ¸öÀà¼ä¹ØÁªÐÔµÄÇ¿Èõ¡£·ÖÀàÆÊÃæͼÁ˽


Ïà¹ØÎĵµ£º

SQL Server Óï¾ä²éѯÊÖ²á

½¨±í£º
CREATE TABLE  [DB.dbo].tableName
(Stud_id int CONSTRAINT  constraintName1  not null primary key,
 Name nvarchar(5) not null,
 Birthday datetime,
 Gender nchar(1),
 Telcode char(12),
 Zipcode char(6) CONSTRAINT constraintName2 CHECK(zipcode like [ ......

sql³£ÓÃÓï¾ä

ÔÚSQLSERVER£¬¼òµ¥µÄ×éºÏsp_spaceusedºÍsp_MSforeachtableÕâÁ½¸ö´æ´¢¹ý³Ì£¬¿ÉÒÔ·½±ãµÄͳ¼Æ³öÓû§Êý¾Ý±íµÄ´óС£¬°üÀ¨¼Ç¼×ÜÊýºÍ¿Õ¼äÕ¼ÓÃÇé¿ö£¬·Ç³£ÊµÓã¬ÔÚSqlServer2KºÍSqlServer2005Öж¼²âÊÔͨ¹ý¡£
/*
1. exec sp_spaceused '±íÃû'            £¨SQLͳ¼ÆÊý¾Ý£¬´óÁ¿ÊÂÎñ²Ù×÷ºó¿É ......

SQL»ù±¾Óï¾ä

ÕÆÎÕSQLËÄÌõ×î»ù±¾µÄÊý¾Ý²Ù×÷Óï¾ä£ºInsert£¬Select£¬UpdateºÍDelete¡£
¡¡¡¡ Á·ÕÆÎÕSQLÊÇÊý¾Ý¿âÓû§µÄ±¦¹ó²Æ ¸»¡£ÔÚ±¾ÎÄÖУ¬ÎÒÃǽ«Òýµ¼ÄãÕÆÎÕËÄÌõ×î»ù±¾µÄÊý¾Ý²Ù×÷Óï¾ä—SQLµÄºËÐŦÄÜ—À´ÒÀ´Î½éÉܱȽϲÙ×÷·û¡¢Ñ¡Ôñ¶ÏÑÔÒÔ¼°ÈýÖµÂß¼­¡£µ±ÄãÍê³ÉÕâЩѧϰºó£¬ÏÔÈ»ÄãÒѾ­¿ªÊ¼ËãÊǾ«Í¨SQLÁË¡£
¡¡¡¡ÔÚÎÒÃÇ¿ªÊ¼Ö®Ç°£¬ÏÈ ......

С²¼×÷Æ·£ºOracle 11g SQL»ù´¡ÈëÃÅϵÁÐÅàѵ(È«30½²)

==============================================
 
µÚ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 ......

ÈçºÎÔÚSQLÖÐÆôÓÃÈ«ÎļìË÷¹¦ÄÜ

ÈçºÎÔÚSQLÖÐÆôÓÃÈ«ÎļìË÷¹¦ÄÜ£¿
¡¡¡¡--------------------------------------------------------------------------------
¡¡¡¡È«ÎÄË÷ÒýµÄÒ»¸öÀý×Ó£¬ÔÚ²éѯ·ÖÎöÆ÷ÖÐʹÓãº
¡¡¡¡use pubs
¡¡¡¡go
¡¡¡¡--´ò¿ªÊý¾Ý¿âÈ«ÎÄË÷ÒýµÄÖ§³Ö
¡¡¡¡execute sp_fulltext_database 'enable'
¡¡¡¡go
¡¡¡¡--½¨Á¢È«ÎÄĿ¼ft_titles
¡¡¡ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ