VS2010Öд´½¨×Ô¶¨ÒåSQL Rule£¨ºÂÏÜç⣩
VS2010ÒѾ·¢²¼¼¸Ììʱ¼äÁË£¬Ò»Ð©ÐµÄÌØÐÔÌرðÒýÈËעĿ£¬±ÈÈ磺 ÐÔÄܵÄÎȶ¨ºÍÌáÉý£¬±íÏÖÔÚWPF GUIºÍWPFÎı¾³ÊÏÖ¡£ Windows Azure ToolsÄ£°å¡£ ¶àÏÔʾÆ÷Ö§³Ö£¬Êä³ö´°¿Ú£¬Ààͼ´°¿Ú£¬´úÂ붨Òå´°¿ÚµÈÌṩ¸¨ÖúÐÅÏ¢µÄ´°¿Ú·ÅÖÃÔÚ¸±ÏÔʾÆ÷ÖС£ ¶Ô²¢ÐмÆË㿪·¢µÄ´óÁ¿Ö§³Ö¡£ °üº¬ÁËSharePointµÄÏîÄ¿Ä£°åºÍµ÷ÊÔÖ§³Ö¡£ ÓÃÓÚSilverlightºÍWPFµÄÍÏ·Å°ó¶¨Ö§³Ö¡£ C++ IDEµÄÔöÇ¿£ºÍ¨¹ý¼òµ¥µÄÍϷŲÙ×÷£¬¾ÍÄÜÉú³ÉÎȽ¡µÄWindows´°ÌåÓ¦ÓóÌÐò¡£ ͨ¹ý²¢Ðа²×°ÒÔÏòºó¼æÈÝ.NET 3.5¡£ F#ÓïÑÔµÄÖ§³Ö£¬JavaScriptÖÇÄܸÐÖªÒýÇæµÈµÈ¡£ ³ýÈ¥ÒÔÉÏÌØÐÔ£¬´´½¨×Ô¶¨ÒåSQL RuleÒ²ÓÐËù±ä»¯¡£±¾ÎľÍÈçºÎÔÚVS2010Öд´½¨SQL Rule½øÐÐ˵Ã÷ ¡£ 1. ʲôÊÇVisual Studio Database EditionÒÔ¼°ÌØÐÔ¡£ Visual Studio Database Edition(ÒÔϼò³ÆVSDB)ÊÇÕë¶ÔµäÐ͵ÄÊý¾Ý¿â¿ª·¢ÈÎÎñ¶øÉè¼ÆµÄ£¬¿ÉÒÔ¶ÔÔÓÐÊý¾Ý¿â·´Ïò¹¤³Ì£¬Ìí¼Ó±í£¬´æ´¢¹ý³ÌºÍÆäËûÊý¾Ý¿âÏîÄ¿£¬¶øÇÒÓÐÑ¡ÔñÐԵؽ«Ð޸IJ¿Êðµ½Ä¿±êÊý¾Ý¿âÖС£ËûµÄÖ÷ÒªÌØÐÔÓУº 1.1Ä£ÐͶԱȣ¨Schema Compare£© ÔÚÏîÄ¿µÄά»¤ºÍÉý¼¶Æڼ䣬ÖÁÉÙÐèҪά»¤²úÆ·Êý¾Ý¿â£¨ÕýÔÚÕýʽÔËÓªµÄÊý¾Ý¿â£©¡¢²âÊÔÊý¾Ý¿â¡¢¿ª·¢Êý¾Ý¿âÕâÈý¸öÊý¾Ý¿â£¬ÄÇ¿ª·¢Êý¾Ý¿â½á¹¹±ä¸üºó£¬ÈçºÎͬ²½µ½ÆäËûÁ½¸öÊý¾Ý¿âÉÏÄØ£¿Ä£ÐͶԱȹ¦ÄÜ¿ÉÒԺܺõؽâ¾ö´ËÎÊÌâ¡£Èç¹û¿ª·¢Êý¾Ý¿â½á¹¹±ä¸ü£¬¿ÉÒÔͨ¹ýÑ¡Ôñ²Ëµ¥µÄData ¡ú Schema Compare ¡ú FilterÖÐÑ¡ÔñDifferent Objects, Missing Objects or New ObjectsÀ´¹ýÂËÁÐ±í¡£Õâ¸ö¹ýÂË¿ÉÒÔʹÎÒÃÇ¿ìËٵؿ´µ½ÄÄЩÐÞ¸ÄÐèÒª¸üе½Ä¿±êÊý¾Ý¿âÖС£È»ºóÎÒÃÇ¿ÉÒÔ±£´æÐ޸Ľű¾µ½Ò»¸öÎļþÖУ¬²¢ÔÚT-SQL±à¼Æ÷»òÕßÖ±½Ó½«Ð޸ľ«Ð´È뵽Ŀ±êÊý¾Ý¿â¡£ 1.2Êý¾Ý¶Ô±È£¨Data Compare£© ÓÃÀ´±È½ÏÁ½¸öÊý¾Ý¿âµÄ±í»òÕßÊÓͼÖÐÊý¾ÝÊÇ·ñÏàͬ£¬¿É½øÐбȽϵÄÇ°ÌáÊÇÊý¾Ý¿âÃû³ÆÒ»Ö¡¢±í¾ßÓÐÏàͬµÄÖ÷¼ü¡¢Î¨Ò»Ë÷Òý»òΨһԼÊø¡£±È½ÏÍêºó¿ÉÒÔ¶ÔÐ޸ı£´æµ½Ä¿±êÊý¾Ý¿â»òÕ߽ű¾¡£Õâ¸öÌØÐÔ¿ÉÒÔ½«²úÆ·Êý¾Ý¿âµÄÊý¾Ýµ¼Èëµ½¿ª·¢Êý¾Ý¿â»òÕß²âÊÔÊý¾Ý¿â£¬ÒÔ±ãÓÚ¿ª·¢ºÍ²âÊÔ¡£ 1.3Êý¾ÝÉú³É¼Æ»®£¨Data Generation Plans£© ÔÚÏîÄ¿ÖУ¬¿ª·¢ÍŶÓÿÖÜÖÁÉÙÒ»´ÎÌá½»°æ±¾µ½²âÊÔ»·¾³£¬²âÊÔÈËÔ±Õë¶ÔеÄÊý¾Ý½á¹¹ÈçºÎ¿ìËÙÉú³É²âÊÔ»ù´¡Êý¾ÝÄØ£¿ Êý¾ÝÉú³É¼Æ»®»á½â¾ö´ËÎÊÌâ¡£ÔÚÊý¾ÝÉú³É¼Æ»®¼Æ»®ÖУ¬ÎÒÃÇÒª¶¨ÒåÉú³ÉÊý¾ÝµÄ±í¡¢Ã¿Ò»¸ö±íÒªÉú³ÉµÄ¼Ç¼ÐÐÊýºÍÒª²åÈëÊý¾ÝµÄÀàÐÍ¡£Êý×ÖÀàÐͱȽÏÈÝÒ×Éú³É£¬Õë¶ÔÌØÊâµÄÊý¾Ý±ÈÈçEmail¡¢µç»°ºÅÂë¿ÉÒÔͨ¹ýÕýÔò±í´ïʽRegExÍê³
Ïà¹ØÎĵµ£º
SQLÓÅ»¯²éѯ
ÊÕ²Ø
Êý¾Ý¿âµÄ²éѯÓÅ»¯¼¼Êõ
Êý¾Ý¿âϵͳÊǹÜÀíÐÅϢϵͳµÄºËÐÄ£¬»ùÓÚÊý¾Ý¿âµÄÁª»úÊÂÎñ´¦Àí£¨OLTP£©ÒÔ¼°Áª»ú·ÖÎö´¦Àí(OLAP)ÊÇÒøÐС¢ÆóÒµ¡¢Õþ¸®µÈ²¿ÃÅ×îΪÖØÒªµÄ¼ÆËã»úÓ¦
ÓÃÖ®Ò»¡£´Ó´ó¶à ......
н¨±í£º
create table [±íÃû]
(
[×Ô¶¯±àºÅ×Ö¶Î] int IDENTITY (1,1) PRIMARY KEY ,
[×Ö¶Î1] nVarChar(50) default 'ĬÈÏÖµ' null ,
[×Ö¶Î2] ntext null ,
[×Ö¶Î3] datetime,
[×Ö¶Î4] money null ,
[×Ö¶Î5] int default 0,
[×Ö¶Î6] Decimal (12,4) default 0,
[×Ö¶Î7] image null ,
)
ɾ³ý±í£º
Drop table [±í ......
ÕâÊÇCSDNÂÛ̳ÀïÃæµÄÒ»¸öÌû×Ó£¬×÷ÕßÊÇ°®Ð¾õÂÞ.ع»ª¡£¸Ð¾õ±È½ÏÈ«Ã棬¾ÍÕûÀíÏÂÀ´ÁË£¬Áô×÷ÒÔºó²Î¿¼±¸Óá£ÔÚ´Ë£¬Ôڴ˸Ðл±¾ÎĵÄ×÷Õß¡£
/*
±êÌ⣺һ¸öÏîÄ¿Éæ¼°µ½µÄ50¸öSqlÓï¾ä(ÕûÀí°æ)
×÷Õߣº°®Ð¾õÂÞ.ع»ª(Ê®°ËÄê·çÓ꣬ÊصñùɽѩÁ«»¨¿ª)
ʱ¼ä£º2010-05-10
µØµã£ºÖØÇ캽ÌìְҵѧԺ
˵Ã÷£ºÒÔÏÂÎåÊ®¸öÓï¾ä¶¼°´ÕÕ²âÊÔÊý¾Ý½øÐ ......
Ò»¡¢Ô¼Êø
Ô¼Êø¶¨Òå¹ØÓÚÁÐÖÐÔÊÐíÖµµÄ¹æÔò£¬ÊÇÇ¿ÖÆÍêÕûÐԵıê×¼»úÖÆ¡£
ʹÓÃÔ¼ÊøÓÅÏÈÓÚʹÓô¥·¢Æ÷¡¢¹æÔòºÍĬÈÏÖµ¡£²éѯÓÅ»¯Æ÷ҲʹÓÃÔ¼Êø¶¨ÒåÉú³É¸ßÐÔÄܵIJéѯִÐмƻ®¡£SQL Server 2005Ö§³ÖÎåÀàÔ¼Êø£º
1. NOT ......
Ò»¡¢ÉîÈëdz³öÀí½âË÷Òý½á¹¹
ʵ¼ÊÉÏ£¬Äú¿ÉÒÔ°ÑË÷ÒýÀí½âΪһÖÖÌØÊâµÄĿ¼¡£Î¢ÈíµÄSQL SERVERÌṩÁËÁ½ÖÖË÷Òý£º¾Û¼¯Ë÷Òý£¨clustered index£¬Ò²³Æ¾ÛÀàË÷Òý¡¢´Ø¼¯Ë÷Òý£©ºÍ·Ç¾Û¼¯Ë÷Òý£¨nonclustered index£¬Ò²³Æ·Ç¾ÛÀàË÷Òý¡¢·Ç´Ø¼¯Ë÷Òý£©¡£ÏÂÃ棬ÎÒÃǾÙÀýÀ´ËµÃ÷һϾۼ¯Ë÷ÒýºÍ·Ç¾Û¼¯Ë÷ÒýµÄÇø±ð£º
Æäʵ£¬ÎÒÃǵĺºÓï×ÖµäµÄÕýÎı¾Éí¾ ......