µäÐ͵ÄÐÐתÁеÄSQLÓï¾ä
ÒÔORACLEÊý¾Ý¿âΪÀý£¬ ½«tab±íÖеÄtname×Ö¶Îת³ÉÒÔ¶ººÅ·Ö¸ôµÄ×Ö·û´®
SQLÈçÏ£º
select substr(max(sys_connect_by_path(tname, ',')), 2)
from (
select b.tname, b.t1, lead(b.t1, 1) over (order by b.t1) t2
from (
select a.tname, row_number() over (order by tname desc) t1 from tab a
) b
)
start with t2 is null
connect by prior t1 = t2;
Ïà¹ØÎĵµ£º
ϵͳ»·¾³£ºWindows 7
Èí¼þ»·¾³£ºVisual C++ 2008 SP1 +SQL Server 2005
±¾´ÎÄ¿µÄ£º±àдһ¸öº½¿Õ¹ÜÀíϵͳ
ÕâÊÇÊý¾Ý¿â¿Î³ÌÉè¼ÆµÄ³É¹û£¬ËäÈ»³É¼¨²»¼Ñ£¬µ«ÊÇ×÷ΪÎÒÓÃVC++ ÒÔÀ´±àдµÄ×î´ó³ÌÐò»¹ÊÇ´«µ½ÍøÉÏ£¬ÒÔ¹©²Î¿¼¡£ÓÃVC++ ×öÊý¾Ý¿âÉè¼Æ²¢²»ÈÝÒ×£¬µ«Ò²²»ÊDz»¿ÉÄÜ¡£ÒÔÏÂÊÇÎҵijÌÐò½çÃ棬ºóÃæ ......
SQL Native Client ODBC Driver
±ê×¼°²È«Á¬½Ó
Driver={SQL Native Client};Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;
ÄúÊÇ·ñÔÚʹÓÃSQL Server 2005 Express ÇëÔÚ“Server”Ñ¡ÏîʹÓÃÁ¬½Ó±í´ïʽ“Ö÷»úÃû³Æ\SQLEXPRESS”¡£
ÊÜÐŵÄÁ¬½Ó
Driver={SQL Native ......
×÷ΪһÃûÊý¾Ý¿âDBA£¬¿Ï¶¨»áÌý˵¹ý“tempdbÊý¾Ý¿âÂúÁË”¡£Í¨³£ÎÒÃǺÜÈÝÒ×È·¶¨Ôì³ÉÕâÒ»ÎÊÌâµÄÔÒò¡£µ«ÊǸü¶àµÄʱºòÕâÒ»ÎÊÌâÖ÷ÒªÔ´ÓÚÒ»×éÇëÇó£¬Éæ¼°µ½Ð´úÂ벿Êð»òÖð½¥Ôö¼ÓµÄÊý¾Ý¡£
¡¡¡¡“TempdbÂúÁË”Òâζ×Åʲô?
¡¡¡¡µ±SQL Server tempdbÂúÁËʱ£¬Éϲã¹ÜÀí³£³£ÐèÒª¾ö²ß¡¢Ò»Ð©¿ª·¢ÈËÔ±¿ÉÄÜ»áÍÆжÔðÈΣ¬¾ ......
NOLOCKºÍREADPASTµÄÇø±ð¡£
1.¿ªÆôÒ»¸öÊÂÎñÖ´ÐвåÈëÊý¾ÝµÄ²Ù×÷¡£
BEGIN TRAN t
INSERT INTO Customer
SELECT 'a','a'
2.Ö´ÐÐÒ»Ìõ²éѯÓï¾ä¡£
SELECT * from Customer WITH (NOLOCK)
½á¹ûÖÐÏÔʾ”a”ºÍ”a”¡£µ±1ÖÐÊÂÎñ»Ø¹öºó£¬ÄÇôa½«³ÉΪÔàÊý¾Ý¡£(×¢:1ÖеÄÊÂÎñδÌá½») ¡£NOLOCK±íÃ÷ûÓжÔÊý¾Ý±íÌ ......