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

ÎÞ·¨Á¬½Óа²×°µÄSQL Server 2005 Express

½ñÌìÔÚµçÄÔÉÏ°²×°ÁËVisual Studio 2005£¬ÀïÃæ×Ô´øÁËÒ»¸öSQL Server 2005 Express¡£°²×°Íê³ÉÖ®ºó½øÈëVS£¬Ð½¨Ò»¸öÊý¾Ý¿âÏîÄ¿£¬Ôړн¨Êý¾Ý¿âÒýÓÔһ²½Óöµ½ÁËÆæ¹ÖµÄÎÊÌâ¡£
ÔÚ·þÎñÆ÷ÃûµÄÏÂÀ­ÁбíÀïÃ棬ͨ¹ýµã»÷“ˢД°´Å¥¿ÉÒÔÏÔʾµ±Ç°Í¨¹ýÍøÂç¿ÉÒÔÁ¬½Óµ½µÄÊý¾Ý¿âµÄÐÅÏ¢£¬ÆäÖÐÓÐÎÒµÄÖ÷»ú¡£È»¶ø£¬Ñ¡ÔñÁËÎÒµÄÖ÷»úÖ®ºó£¬“Á¬½Óµ½Ò»¸öÊý¾Ý¿â”ÖÐÈ´²»ÄÜÏÔʾÎÒÖ÷»úÊý¾Ý¿âÀïÃæµÄ±íµÄÐÅÏ¢£¬²¢ÇÒ»á³öÏÖ³ö´íÌáʾ¡£ËäÈ»ÕâÖ»ÊÇһ̨а²×°µÄÊý¾Ý¿â£¬µ«ÀïÃæ´æÔÚһЩ³õʼ»¯ºÃµÄÊý¾Ý¿âµÄ£¨Èçtempdb£©¡£
ÔÚÍøÉϲéÁ˺ܶà¹ØÓÚ“ÎÞ·¨Á¬½ÓSQL Server 2005”µÄ×ÊÁÏ£¬ÆäÖÐÓÐһЩ½éÉÜ˵ÓпÉÄÜÊÇÒòΪSQL ServerµÄ“Ô¶³ÌÁ¬½Ó”±»½ûÓÃÁË£¬Í¨¹ý“¿ªÊ¼”->“Microsoft SQL Server 2005”->“ÅäÖù¤¾ß”->“SQL Server ÍâΧӦÓÃÅäÖÃÆ÷”°ÑSQL ServerµÄ“Ô¶³ÌÁ¬½Ó”ÆðÆðÀ´¡£µ«ÎÒ·¢ÏÖÎÒÕą̂Êý¾Ý¿âµÄ“Ô¶³ÌÁ¬½Ó”ĬÈÏÊÇ¿ªÆô×ŵġ£
ºóÀ´Ïëµ½£¬¼ÈÈ»·þÎñÒѾ­¿ªÆôÁË£¬¶øÇÒÔ¶³ÌÁ¬½ÓÒ²¿ªÆôÁË£¬ÔÙ·ÃÎʲ»µ½Êý¾Ý¿âµÄ»°ÓпÉÄÜÊÇÍøÂçÎÊÌâµ¼Öµġ£¼´Ê¹ÊDZ¾»ú£¬µ«¾ÝÎÒµÄÀí½â£¬¶ÔÊý¾Ý¿âµÄ·ÃÎÊÊÇͨ¹ýÍøÂç¶Ë¿ÚÀ´½øÐеġ£ÓÚÊÇÎÒ°ÑSQL ServerÏà¹ØµÄ·þÎñ¶¼Ìí¼Óµ½·À»ðǽµÄÀýÍâ³ÌÐòµ±ÖУ¬ÎÊÌ⻹¾ÍÕæµÄ½â¾öÁË¡£
¾õµÃWindowsÄÚÖõķÀ»ðǽÐÐΪͦÆæ¹ÖµÄ¡£ÎÒÒÔÇ°ÔÚÆäËûµçÄÔÉÏÒ²×°¹ýVS 2005ºÍSQL Server 2005 Express£¬µ«È´Ã»ÓÐÓöµ½¹ýÕâ¸öÎÊÌ⡣ͬһ¸öÈí¼þ£¬ÔÚ²»Í¬µÄ»úÆ÷ÉÏ°²×°£¬·À»ðǽµÄ´¦Àí·½Ê½»á²»Ò»Ñù£¬Õæ¹»Ææ¹ÖµÄ¡£


Ïà¹ØÎĵµ£º

SQL Ñ­»·Óï¾ä while ½éÉÜ ÊµÀý ¼ò½é

 declare @i int
set @i=1
while @i<30
begin
insert into test (userid) values(@i)
set @i=@i+1
end
---------------
while Ìõ¼þ
begin
Ö´ÐвÙ×÷
set @i=@i+1
end
WHILE
ÉèÖÃÖظ´Ö´ÐÐ SQL Óï¾ä»òÓï¾ä¿éµÄÌõ¼þ¡£Ö»ÒªÖ¸¶¨µÄÌõ¼þΪÕ棬¾ÍÖظ´Ö´ÐÐÓï¾ä¡£¿ÉÒÔʹÓà BREAK ºÍ CONTINUE ¹Ø¼ü×ÖÔÚÑ­»·ÄÚ²¿¿ ......

³£¼ûOracle HINTµÄÓ÷¨ SQLÓÅ»¯

ÔÚSQLÓï¾äÓÅ»¯¹ý³ÌÖУ¬ÎÒÃǾ­³£»áÓõ½hint,ÏÖ×ܽáÒ»ÏÂÔÚSQLÓÅ»¯¹ý³ÌÖг£¼ûOracle HINTµÄÓ÷¨£º
1. /*+ALL_ROWS*/
±íÃ÷¶ÔÓï¾ä¿éÑ¡Ôñ»ùÓÚ¿ªÏúµÄÓÅ»¯·½·¨,²¢»ñµÃ×î¼ÑÍÌÍÂÁ¿,ʹ×ÊÔ´ÏûºÄ×îС»¯.
ÀýÈç:
SELECT /*+ALL+_ROWS*/ EMP_NO,EMP_NAM,DAT_IN from BSEMPMS WHERE EMP_NO=’SCOTT’;
2. /*+FIRST_ROWS*/
±í ......

SQL SERVER¶¨Ê±×÷ÒµµÄÉèÖ÷½·¨

         SQL SERVER¶¨Ê±×÷ÒµµÄÉèÖ÷½·¨
תÌù×Ô£º http://www.cnblogs.com/stephencat/archive/2006/08/24/484918.html
 Èç¹ûÔÚSQL Server ÀïÐèÒª¶¨Ê±»òÕßÿ¸ôÒ»¶Îʱ¼äÖ´ÐÐij¸ö´æ´¢¹ý³Ì»ò3200×Ö·ûÒÔÄÚµÄSQLÓï¾äʱ,
¿ÉÒÔÓùÜÀí->SQL Server´úÀí->×÷ÒµÀ´ÊµÏÖ¡£
1¡¢¹ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ