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

¹ØÓÚsql where id in ת»»³ÉÊý¾ÝÀàÐÍ int ʱʧ°Ü

ÓÐÖ´ÐÐsqlÌõ¼þÓï¾äwhere id in(@²ÎÊý)µÄʱºò£¬Èç¹û´¦Àí²»µ±£¬¾Í»á³öÏÖÎÊÌ⣺
ÈçÏÂÃæÕâ¸ö´æ´¢¹ý³Ì£º
alter proc Web_gettwtwgoldgameserverGoldSell
@ID int
as
declare @twgoldsellID nvarchar(1000)
select @twgoldsellID=twgoldsellID from twgoldgameserver where ID=@ID
set @twgoldsellID=replace(@twgoldsellID,'|',',')
set @twgoldsellID=left(@twgoldsellID,len(@twgoldsellID)-1)
select * from twgoldsell where ID in (@twgoldsellID)
ÎÒÃÇ¿´ÉÏÈ¥ºÃÏñûÓÐʲôÎÊÌ⣬ȴÔÚÖ´ÐеÄʱºò±¨´í£º
ÏûÏ¢ 245£¬¼¶±ð 16£¬×´Ì¬ 1£¬µÚ 1 ÐÐ
ÔÚ½« varchar Öµ '813,1160,1219,1227,1232' ת»»³ÉÊý¾ÝÀàÐÍ int ʱʧ°Ü¡£
Æäʵ´ËÌõÓï¾äÔÚÖ´ÐÐʱ,
select * from twgoldsell where ID in (@twgoldsellID)
Ö´ÐеÄÓï¾äÊÇ£ºselect * from twgoldsell where ID in ('813,1160,1219,1227,1232')
ÕâÑùÖ´Ðе±È»³ö´í£¬ÒòΪ@twgoldsellIDÊÇÒ»¸ö×Ö·û´®£¬ÏÖÔÚÊÇÒÔ²ÎÊýµÄÐÎʽ´«µÝ¡£
½â¾ö°ì·¨£º
select * from twgoldsell where ID in (@twgoldsellID)
¸ÄΪ:
exec('select * from twgoldsell where ID in ('+@twgoldsellID+')')
¼Çס£ºÒ»¶¨Òª¼ÓexecÖ´Ðк¯Êý£¬²»È»»á±¨ÈçÏ´íÎó£º
ÏûÏ¢ 245£¬¼¶±ð 16£¬×´Ì¬ 1£¬¹ý³Ì Web_gettwtwgoldgameserverGoldSell£¬µÚ 8 ÐÐ
ÔÚ½« varchar Öµ '+@twgoldsellID+' ת»»³ÉÊý¾ÝÀàÐÍ int ʱʧ°Ü¡£
¹ØÓÚsqlÌõ¼þÓï¾äwhere id in (@²ÎÊý)Ö´Ðб¨´íÎÊÌâ(ת»»³ÉÊý¾ÝÀàÐÍ int ʱʧ°Ü)½â¾öÍê³É£¬ÓÐʲôÎÊÌ⣬¿ÉÒÔÒ»ÆðÔÚ¼¼ÊõÉçÇø(http://bbs.25yi.com)ÌÖÂÛ¡£
×÷Õß: ÍøÕ¾Éè¼Æ@ ÆóÒµÍøÕ¾¹ÜÀíϵͳ
 Ô­ÔØ: 25ÒÚÆóÒµÍøÕ¾¹ÜÀíϵͳ


Ïà¹ØÎĵµ£º

ͨ¹ýpl/sql ½«oracle10Êý¾Ýµ¼Èëoracle9ÖÐ


1¡¢  ´ò¿ªpl/sql ÖÐtools-preferences£¬ÉèÖÃConnectionÖеÄOracle HomeΪoracle9£¬OCI libraryΪoracle9 Èçͼ
2¡¢
         ½«oralce10Ŀ¼ÏµÄtnsnames.oraÎļþÀïÃæµÄËùÒªµ¼³öµÄoralce10µÄ·þÎñÅäÖà ¸´ÖƵ½oracle9Ŀ¼ÏµÄtnsnames.oraÎļþÀïÃæ
ORCL =
  (DESCRIP ......

³£ÓÃSQLÓï¾äÊÕ¼¯

1.ɾ³ý±í
  select 'drop table ' || table_name || ' purge;'
  from user_tables
  where length(table_name) <= 4;
    ɾ³ý´øÔ¼ÊøµÄ±í
    Drop table ±íÃû cascade  constraints;
2.²éѯview&ͬÒå´Ê
   --˵Ã÷£º¿ÉÒÔ¸ù¾ÝÊÓͼµÄtext_length ......

SQL Server 2008±íÉè¼ÆÆ÷ÖÐÎÞ·¨±£´æÐÞ¸Ä

µ±Ê¹ÓÃMicrosoft SQL Server 2008 Management Studioʱ£¬ÓÐʱÔÚ±íÉè¼ÆÆ÷ÖжԱíËù×öµÄ¸ü¸ÄÎÞ·¨±£´æ£¬¾ßÌå±íÏÖΪ£ºµã»÷±£´æ°´Å¥ºóµ¯³ö±£´æ¶Ô»°¿òÌáʾ£º²»ÔÊÐí±£´æÐÞ¸Ä(Saving changes is not permitted)£¬µ¯³öµÄ¶Ô»°¿òÖ»ÓÐ2¸ö°´Å¥¿ÉÒÔµã»÷£¬Ò»¸öCancelÒ»¸öSave Text File£¬Ç°Ò»¸ö¾Í²»ÓÃ˵ÁË£¬ºóÒ»¸ö±£´æµÄÎļþ¸ù±¾Ã»ÒâÒ壨¿ÉÒ ......

sql Íâ¼ü ɾ³ý

 1¡£ÆóÒµ¹ÜÀíÆ÷  
  ´ò¿ªÄ㽨ÓÐÍâ¼üµÄ±í£­£­ÓÒ»÷±í£­£­Éè¼Æ±í£­£­ÔÚÉÏ·½µã¿ª’¹ÜÀíÔ¼Êø‘£­£­½«¼¶Á¬É¾³ýºÍ¼¶Á¬¸üÐµĹµ´òÉϾͿÉÒÔÁË  
  2¡£²éѯ·ÖÎöÆ÷  
  alter   table   sc  
  add  
  constraint   forei     ......

sql ²éѯ±íµÄÁÐÃû row_number()

select upper(name) from syscolumns
where id =any
(
select Id from sysobjects where name='tb_city'
)
lower
select row_number() over(order by firmid) from dbo.tb_BuildingMaterial
Éú³É  ×ÔÔö  123
select rank() over(order by firmid) from dbo.tb_BuildingMaterial
Éú³É×ÔÔö123  ¸ù¾ÝÅ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ