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

SQLServerÖеÄÑ­»·Åú´¦Àí

  SQLServerÖеÄÑ­»·Åú´¦Àí
GOÃüÁîºóÃæ¼ÓÒ»¸ö³£Á¿¾Í¿ÉÒÔÁË
ÏÂÃæ·½·¨¿ÉÒÔÓÃÀ´¿ìËÙÉú³ÉÒ»ÅúÊý¾Ý
if (object_id ('t' ) is not null ) drop table t
go
create table t (id int identity (1 , 1 ), name varchar (40 ))
go
insert into t (name ) select newid ()
go 10
select * from t
/*
1    18C1C418-9029-4599-8D5E-616354A113C8
2    A0FE1177-09D8-4C56-9FB5-C2FAFF0155CF
3    9033E8BB-B9A4-4A08-83D8-40064AB68C5F
4    A179A300-E30B-42BF-974E-50928EB7DCF1
5    C1D36D3B-C4D7-431B-8C81-95C9EF9061A0
6    8A99066A-7993-4C06-9763-482C0BF5E687
7    2F0664A8-F91D-4BDE-BA0B-48624137B7CA
8    74C3FED3-6182-4ED9-9BFE-9C3DEC662F35
9    4E7A8CC8-D7CE-4A0D-8562-688FB3F91458
10    EC82BD91-20B3-46C1-B7CC-C4A8A9099376
*/
±¾ÎÄÀ´×ÔCSDN²©¿Í£¬×ªÔØÇë±êÃ÷³ö´¦£ºhttp://blog.csdn.net/jinjazz/archive/2009/08/12/4440209.aspx


Ïà¹ØÎĵµ£º

SQLServerÅúÁ¿µ¹ÈëĿ¼Îļþ ÊÕ²Ø


¿ÉÒÔÓÃÀ©Õ¹´æ´¢¹ý³Ìxp_dirtree»ñÈ¡ÎļþÁÐ±í£¬ÓÃopenrowsetµ¹ÈëÊý¾Ýµ½¶þ½øÖÆ×ֶΡ£
openrowsetµÄÓ÷¨¿ÉÒԲο¼msdn
http://technet.microsoft.com/zh-cn/library/ms190312.aspx
Èç¹ûÎļþºÜ¶à£¬½¨Ò黹ÊÇÓóÌÐòµ¹ÈëÁË
if (object_id ('t_bulkResult' ) is   not   null )
drop table t_bulkResult ......

SQLServerÖеÄScanfºÍPrintf ÊÕ²Ø

SQLServerÖÐÓÐÁ½¸öÀ©Õ¹´æ´¢¹ý³ÌʵÏÖScanfºÍPrintf¹¦ÄÜ£¬Ç¡µ±µÄʹÓÃËüÃÇ¿ÉÒÔÔÚÌáÈ¡ºÍÆ´½Ó×Ö·û´®Ê±´ó·ù¶È¼ò»¯SQL´úÂë¡£
1¡¢xp_sscanf£¬ÓÃËü¿ÉÒÔ·Ö½â¸ñʽÏà¶Ô¹Ì¶¨µÄ×Ö·û´®£¬Õâ¶ÔÓÚÑá¾ëʹÓÃÒ»¶ÑsubstringºÍcharindexµÄÅóÓÑÀ´Ëµ²»´í¡£±ÈÈçÇ°¼¸ÌìµÄÒ»¸öÌû×ÓÖÐÌá³öµÄÈçºÎ·Ö½âipµØÖ·£¬Ïà¶Ô¼òÁ·ÇÒͨÓõĴúÂëÓ¦¸ÃÊÇÏÂÃæÕâÑù
------- ......

SQLServerÖеÄÑ­»·Åú´¦Àí

if (object_id ('t' ) is not null ) drop table t
go
create table t (id int identity (1 , 1 ), name varchar (40 ))
go
insert into t (name ) select newid ()
go 10
select * from t
/*
1    18C1C418-9029-4599-8D5E-616354A113C8
2    A0FE1177-09D8-4C56-9FB5-C2FA ......

Ëø³õ̽(sqlserver 2005)

HOLDLOCK ½«¹²ÏíËø±£Áôµ½ÊÂÎñÍê³É£¬¶ø²»ÊÇÔÚÏàÓ¦µÄ±í¡¢ÐлòÊý¾ÝÒ³²»ÔÙÐèҪʱ¾ÍÁ¢¼´ÊÍ·ÅËø¡£HOLDLOCK µÈͬÓÚ SERIALIZABLE¡£
NOLOCK ²»Òª·¢³ö¹²ÏíËø£¬²¢ÇÒ²»ÒªÌṩÅÅËüËø¡£µ±´ËÑ¡ÏîÉúЧʱ£¬¿ÉÄÜ»á¶ÁȡδÌá½»µÄÊÂÎñ»òÒ»×éÔÚ¶ÁÈ¡Öмä»Ø¹öµÄÒ³Ãæ¡£ÓпÉÄÜ·¢ÉúÔà¶Á¡£½öÓ¦ÓÃÓÚ SELECT Óï¾ä¡£
 PAGLOCK ÔÚͨ³£Ê¹Óõ¥¸ö±íËøµ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ