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

Çë½Ìsql¸ßÊÖ,¹ØÓÚms-sqlserverËø»úÖÆ

SQL code:

declare @cnt int
select @cnt=count(1) from TableTest
if(@cnt==0)
insert into TableTest values(1,'abc')



¶ÔÓÚÕâÑùµÄÒ»¶Îsql²¢·¢Ö´ÐÐʱ,Ó¦¸ÃÓпÉÄܲåÈëÖظ´¼Ç¼
²»ÖªµÀ´ó¼ÒÊÇÔõô·ÀÖ¹³öÏÖÖظ´Êý¾Ý,ÎÒÓÃÁË±í¼¶Ëø,¿ÉÊÇ»¹ÊdzöÏÖÁËÁ½ÌõͬÑù¼Ç¼
ÎÒÊÇÕâÑù´¦ÀíµÄ

SQL code:

declare @cnt int
begin tran
select @cnt=count(1) from TableTest with(TABLOCKX)
if(@cnt==0)
begin
insert into TableTest values(1,'abc')
commit tran
end


´òhappyflystone..³¬¼¶Ç¿ÈË..¸ú±«¶ûĬһÑùÇ¿..

Ö»ÖªµÀhappyflystone  ²»ÖªµÀ±«¶ûĬ

¼Ó¸öÔ¼Êø²»¾ÍÐÐÂð

with(TABLOCKX) »áÓÐxËø£¬Ó¦¸Ã²»»áÖظ´

ѧϰ

lzµÄд·¨ÖÁÉÙÓ¦¸ÃÓиöelse rollback tran


¶¥Ò»ÏÂ~

²»Çå³þ£¬¶¥ÏÂ×Ó

ѧϰ

ÒýÓÃ
lzµÄд·¨ÖÁÉÙÓ¦¸ÃÓиöelse rollback tran

up

ÒýÓÃ
ÒýÓà 6 Â¥ perfectaction µÄ»Ø¸´:
lzµÄд·¨ÖÁÉÙÓ¦¸ÃÓиöelse rollback tran

up


elseÎҵĴúÂëÀïÓÐ
É¢·Ö~


Ïà¹ØÎÊ´ð£º

asp.netÈçºÎÁ¬½ÓSQL SERVERÊý¾Ý¿â

ÎÒ°²×°SQL SERVER2008µÄʱºòÑ¡ÔñWINDOWSÉí·ÝÑéÖ¤Á¬½ÓµÄ£¬ÎÒ²»ÖªµÀÔõôдÁ¬½Ó¡£¡£¡£
»¹ÓÐÎÒÏë¸Ä³ÉSQL SERVERÉí·ÝÑéÖ¤Ôõô¸Ä£¿£¿
лл´ó¼ÒÁË£¡
XML code:

<configuration>
<appSettings>
& ......

sql ×Ö·û´®´¦ÀíÎÊÌâ À´ÕßÓзÖ


@s='S1,S2,S12,S23';

½«@sÀïÃæµÄS1,S2Ìæ»»³É´¦Àí£¬Î´´¦Àí


À´ÕßÓзÖ.

REPLACE(@s,'S1,S2','´¦Àí,δ´¦Àí')

REPLACE ²»ºÃÓà ×Ô¼ºÊÔÏÂ

SQL code:

declare @s ......

Çë½Ìoracleµ¼³öµ½sql server2005

û¸É¹ýÕâÊ£¬Ò²²»ÖªµÀoracleÊý¾Ý¿âɶÑù£¬Çë½Ì´óϺÃǾßÌå²½ÖèÊÇʲô£¿ÐèҪעÒâЩʲô£¿
ÊÇÕû¸ö¿âµÄÊý¾Ý»¹ÊÇ±íµ¥?

Õæ¸öÊý¾Ý¿â

Õû¸öÊý¾Ý¿â£¬ÁíÍâÎÒÊÇ´Óһ̨װÓÐoracleµÄµçÄÔµ¼Èëµ½Áíһ̨װÓÐsql serverµÄµçÄÔÖС ......

Çó½ÌÒ»¸öSql²éѯÎÊÌâ¡£

ÓÐÈý¸ö±íÒ»¸öÊDzɹºµ¥¸ñʽÈçÏÂ
Èë¿âµ¥±í£º

Èë¿âµ¥ºÅ      ²úÆ·        Öʼì±àºÅ      Èë¿âÊýÁ¿
001          Æ·ÖÖ1&n ......

Çë½Ìoracleµ¼³öµ½sql server2005

û¸É¹ýÕâÊ£¬Ò²²»ÖªµÀoracleÊý¾Ý¿âɶÑù£¬Çë½Ì´óϺÃǾßÌå²½ÖèÊÇʲô£¿ÐèҪעÒâЩʲô£¿


ORACLEÊý¾Ý¿âÀï±íµ¼ÈëSQL ServerÊý¾Ý¿â
   
  1¡¢ÔÚÄ¿µÄSQL ServerÊý¾Ý¿â·þÎñÆ÷ÉÏ°²×°ORAC ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ