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

SQL Server¹ÊÕÏÐÞ¸´¼¼ÇÉ

SQL Server 2005 ºÍ 2008 Óм¸¸ö¹ØÓڸ߿ÉÓÃÐÔµÄÑ¡ÏÈçÈÕÖ¾´«Êä¡¢¸±±¾ºÍÊý¾Ý¿â¾µÏñ¡£ËùÓÐÕâЩ¼¼Êõ¶¼Äܹ»×÷Ϊά»¤Ò»¸ö±¸Ó÷þÎñÆ÷µÄÊֶΣ¬Í¬Ê±Õâ¸öÊý¾Ý¿â¿ÉÒÔÔÚÄãÔ­ÏȵÄÖ÷Êý¾Ý¿â³öÎÊÌâʱÉÏÏß²¢×÷ΪеÄÖ÷·þÎñÆ÷¡£È»¶ø£¬Äã±ØÐë¼ÇסµÄÊǽ«±¸Ó÷þÎñÆ÷Ìæ»»ÉÏÏßÖ»ÊÇÍê³ÉÁËÒ»°ëµÄ¹ÊÕÏÐÞ¸´¹¤×÷¡£
Òª±£Ö¤ÄãµÄÓ¦ÓÃÕý³£¹¤×÷£¬ÔÚÊý¾Ý¿âÍⲿ»¹ÓÐÐí¶à×¢ÒâÊÂÏî¡£ÕâÆäÖаüÀ¨µÇ¼ÐÅÏ¢¡¢Êý¾Ý¿âÓû§¡¢µ÷¶ÈÈÎÎñ¡¢DTS ºÍ SSIS °ü¡¢¿ÉÖ´ÐÐÎļþ¡¢ÏµÍ³Êý¾Ý¿âÖеĶÔÏó¡¢Í¬ÃûÊý¾Ý¿â¡¢Á´½Ó·þÎñÆ÷µÈµÈ¡£
ÓÐʱÕâЩϸСµÄÒÀÀµÖ»ÓÐÔÚÄã½øÐÐÒ»¸öÊý¾Ý¿â¹ÊÕϻָ´Ê±²Å»á·¢ÏÖ£¬ÕâÑùÄãÓÖ²»µÃ²»»¨·Ñ´óÁ¿Ê±¼ä½øÐе÷ÊÔºÍÆÀ¹Àµ¼ÖÂÕâ¸öÎÊÌâµÄ¸ùÔ´¡£´ËÍ⣬Ä㻹±ØÐëÈõڶþ̨·þÎñÆ÷ºÍÓ¦Óþ¡¿ÉÄÜ¿ìµØÉÏÏßÒÔ¼õÉÙÍ£»úʱ¼ä¡£Òò´Ë£¬ÌáÇ°×öÉèÖÃÊǷdz£ÖØÒªµÄ¡£
µ±Éæ¼°µ½¸ß¿ÉÓÃÐÔºÍSQL Server µÄÔÖÄѻָ´¹æ»®Ê±£¬ÄãÓ¦¸Ã½÷¼ÇÎÒ±¾ÈËËùϲ»¶µÄÒ»¸öÀ­¶¡ÑèÓï ——Si vis pacem, para bellum£¬ËüµÄÒâ˼·­Òë¹ýÀ´¾ÍÊÇ“Èç¹ûÄãÏëÒªµÃµ½ºÍƽ£¬ÄǾ͵ÃÏÈ×÷ºÃÕ½Õù×¼±¸¡£”¼ÇסÕâÒ»µãºó£¬ÈÃÎÒÃÇÀ´¿´¿´Ò»Ð©¿ÉÄÜ»áÓöµ½µÄÎÊÌâ¡£ÎÒÒ²½«½¨Ò鼸¸öÔ¤ÏÈ¿ÉÒÔÍê³ÉµÄÈÎÎñ£¬ÒÔÈ·±£Êý¾Ý¿â¹ÊÕϻָ´¹ý³Ì¿ìËÙÓÐЧµØÍê³É¡£
SQL Server µÇ¼ÐÅÏ¢ÓëÊý¾Ý¿âÓû§
ÄãµÄ¹ÊÕϻָ´·þÎñÆ÷Ó¦¸Ã±¸·ÝËùÓеĵǼÐÅÏ¢ºÍÊý¾Ý¿âÓû§£¬°üÀ¨ÃÜÂë¡£µÇ¼ÐÅÏ¢¿ÉÒÔÔÚÈκÎʱºò´´½¨£¬µ«ÊÇÈç¹ûÄãʹÓÃÈÕÖ¾´«Êä»òÊý¾Ý¿â¾µÏñ£¬ÄãµÄÊý¾Ý¿â½«´¦Àí»Ö¸´×´Ì¬£¬ÕâÑùÄãÖ»ÓÐÔÚËüÃÇÖØÐÂÉÏÏߺó²ÅÄÜÍê³É»Ö¸´¹ý³Ì¡£
ʹÓà Windows ÈÏÖ¤£¬¿ÉÒÔºÜÈÝÒ׵ؽ«µÇ¼ÐÅÏ¢Ó³Éäµ½Êý¾Ý¿âÓû§¡£È»¶ø£¬Èç¹ûÄãʹÓõÄÊÇ SQL ÈÏÖ¤£¬ÄÇôÄãÐèÒªÊÖ¶¯µØÔÚÄã´ÓÁíÒ»¸ö·þÎñÆ÷»ñµÃµÄÊý¾Ý¿âÉÏÖØн¨Á¢µÇ¼ÐÅÏ¢ÓëÊý¾Ý¿âÓû§µÄÁ¬½Ó¡£Òò´Ë£¬ÄãÔÚǨÒÆÊý¾Ý¿âʱ»á¶ªÊ§µÇ¼ÐÅÏ¢ºÍÊý¾Ý¿âÓû§Ö®¼äµÄÁ¬½Ó¡£
µ±ÄãÔÚµÚ¶þ̨·þÎñÆ÷Éϻָ´Êý¾Ý¿âºó£¬ÔËÐÐÕâЩ´úÂ룺
USE YourDatabaseName
EXEC sp_change_Users_Login 'UPDATE_ONE', YourDBUserName, YourLogin
±£³ÖµÇ¼ÐÅϢͬ²½µÄÁíÒ»¸ö·½·¨ÊÇ×ñÑ­ Microsoft Knowledge Base ÉϹØÓÚ ÔÚ SQL Server ʵÀýÖ®¼ä´«ÊäµÇ¼ÐÅÏ¢ºÍÃÜÂë µÄÎÄÕµIJ½Öè¡£ÕâƪÎÄÕ²ûÊöÁËÈçºÎʹÓÃԭʼµÄ SID ½Å±¾»¯µÇ¼ÐÅÏ¢¡£µ±ÔÚ¹ÊÕϻָ´Êý¾Ý¿â·þÎñÆ÷ÉÏ´´½¨ÕâЩµÇ¼ÐÅϢʱ£¬µÇ¼ÐÅÏ¢ÓëÊý¾Ý¿âÓû§Ö®¼äµÄÁ¬½Ó»á±»±£´æ£¬ÕâÑùÄã¾Í²»±ØÔËÐÐÉÏÃæµÄ½Å±¾ÐÞ¸´¹ÂÁ¢µÄÓû§¡££¨À´Ô´£º±ÈÌØÍø£©
¶«·½ÈðͨITÅàѵÓë·þÎñÖÐÐÄÓµÓÐÊ®ÄêITÅàѵ¾­Ñ飬רעÖйú¸ß¶ËITÅàѵÊÇÖйú¸ß¶ËITÅàѵµÚһƷÅÆ£¬Ìá¹


Ïà¹ØÎĵµ£º

sqlµÄ INNER JOIN, left join,right joinÓï·¨

inner join(µÈÖµÁ¬½Ó) Ö»·µ»ØÁ½¸ö±íÖÐÁª½á×Ö¶ÎÏàµÈµÄÐÐ
left join(×óÁª½Ó) ·µ»Ø°üÀ¨×ó±íÖеÄËùÓмǼºÍÓÒ±íÖÐÁª½á×Ö¶ÎÏàµÈµÄ¼Ç¼
right join(ÓÒÁª½Ó) ·µ»Ø°üÀ¨ÓÒ±íÖеÄËùÓмǼºÍ×ó±íÖÐÁª½á×Ö¶ÎÏàµÈµÄ¼Ç¼
INNER JOIN Óï·¨£º
INNER JOIN Á¬½ÓÁ½¸öÊý¾Ý±íµÄÓ÷¨£º
SELECT * from ±í1 INNER JOIN ±í2 ON ±í1.×ֶκÅ=±í2 ......

sqlÉú³É½Å±¾ÀïSET ANSI_NULLS ONʲôÒâ˼

±¾ÎÄÀ´×Ô£ºhttp://zhidao.baidu.com/question/27978123.html?si=1
ÕâЩÊÇ SQL-92 ÉèÖÃÓï¾ä£¬Ê¹ SQL Server 2000/2005 ×ñ´Ó SQL-92 ¹æÔò¡£
µ± SET QUOTED_IDENTIFIER Ϊ ON ʱ£¬±êʶ·û¿ÉÒÔÓÉË«ÒýºÅ·Ö¸ô£¬¶øÎÄ×Ö±ØÐëÓɵ¥ÒýºÅ·Ö¸ô¡£µ± SET QUOTED_IDENTIFIER Ϊ OFF ʱ£¬±êʶ·û²»¿É¼ÓÒýºÅ£¬ÇÒ±ØÐë·ûºÏËùÓÐ Transact-SQL ±êÊ ......

²éѯ°à¼¶Öм°¸ñ£¬Ò»°ã£¬ÓÅÐãµÄÈËÊýµÄsqlÓï¾ä

select a.ClassName,a.CourseName,sum(²»¼°¸ñ) as ²»¼°¸ñ,sum(²î) as ²î,sum(ÖеÈ) as ÖеÈ,sum(ºÃ) as ºÃ ,sum(²»¼°¸ñ)+sum(²î)+sum(ÖеÈ)+sum(ºÃ) as °à¼¶×ÜÈËÊý from (select StudentID,ClassName,CourseName,1 as ²»¼°¸ñ,0 as ²î,0 as ÖеÈ,0 as ºÃ from StudentScore where ScoreRemark='fail' union all
select Stu ......

DBF±íÓëSQL Server±íµÄµ¼Èë¡¢µ¼³ö

----------Dbf µ¼Èë Sql Server±í----------
ÒÔϾùÒÔSQL2000¡¢VFP6¼°ÒÔÉϵıíΪÀý
´úÂëµ¼È룺²éѯ·ÖÎöÆ÷ÖÐÖ´ÐÐÈçÏÂÓï¾ä(ÏÈÑ¡Ôñ¶ÔÓ¦µÄÊý¾Ý¿â)
-------------Èç¹û½ÓÊܵ¼ÈëÊý¾ÝµÄSQL±íÒÑ´æÔÚ
--Èç¹û½ÓÊܵ¼ÈëÊý¾ÝµÄSQL±íÒѾ­´æÔÚ
Insert Into ÒѾ­´æÔÚµÄSQL±íÃû Select * from openrowset('MSDASQL','Driver=Microso ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ