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

sqlÓï¾ä´íÎó - MS-SQL Server / »ù´¡Àà

select * from dbo.[Report] where ID like %1% or Report_num like %1% or ID like %ehs% or Report_num like %ehs% order by ID £»

ÏûÏ¢ 102£¬¼¶±ð 15£¬×´Ì¬ 1£¬µÚ 1 ÐÐ
'1' ¸½½üÓÐÓï·¨´íÎó¡£


select * from dbo.[Report] where ID like '%1% 'or Report_num like '%1% 'or ID like '%ehs% 'or Report_num like' %ehs%' order by ID

like '%1%'

'%1%'
ºóÃæµÄÄÇЩÌõ¼þÒ²¶¼Òª¼ÓÉÏÒýºÅ

...Êý¾Ý¿âÀïµÄ×Ö·û´®Òª¼ÓÒýºÅµÄѽ£¡

SQL code:
select *
from dbo.[Report]
where ID like '%1% 'or Report_num like '%1%'
or ID like '%ehs%' or Report_num like '%ehs%'
order by ID


SQL code:
select *
from dbo.[Report]
where ID like '%1%' or Report_num like '%1%'
or ID like '%ehs%' or Report_num like '%ehs%'
order by ID

LIKEºóÃæ¼ÓÒýºÅ£¬Í¬Ê±×¢ÒâÒýºÅÄÚ²»ÄÜÓпոñ£¬³ý·ÇÌØÊâÐèÒª¡£

¼ÓÉÏ''

Õâ¸öµ¥ÒýºÅÎÒºóÀ´×Ô¼ºÒ²ÕÒ³öÀ´ÁË£¬µ«ÏÖÔÚÊÇÎÒµÄÓï¾äÔÚÊý¾Ý¿âÀï¿ÉÒÔÔËÐУ¬ÔÚC#±àÒëÆ÷Àï¾Í²»ÐÐÁË¡£ÏêϸÓï¾ä¼ûÏ£º
select * from dbo.[Report] where ID like '%1%' or Report_num like '%1%' or ID like '%ehs%' or Report_num like '%ehs%' order by ID ;
ÔÚÊý¾Ý¿âûÎÊÌâ¡£ÔÚvs2005À´úÂëÈçÏ£º
C# code



Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www


Ïà¹ØÎÊ´ð£º

Çë½ÌsqlÓï¾ä¡£ - Oracle / ¿ª·¢

ÎÒÓÐÒ»¸ö±í£¬½á¹¹ÊÇÕâÑù¡£
  ת³ö µ¥Î» תÈ뵥λ ±ÊÊý ½ð¶î
date(Ö÷) outid(Ö÷) inid(Ö÷) num amt
2009 1 2 1 500 Ϊ 1 µ¥Î» ÔÚ2009Ä ......

SQLÈçºÎÓÅ»¯ÎÊÌâ - MS-SQL Server / ÒÉÄÑÎÊÌâ

½ñÌì×öÁËÒ»¸ö´æ´¢¹ý³Ì   »·¾³ÊÇSQL2000Êý¾Ý¿â  
´óÖÂÈçÏÂ
½¨Á¢ÁÙʱ±í
¶¨ÒåÔ±¹¤Óαê
        Ñ­»·Ô±¹¤£¨ÊôÓÚ1¸ö¹«Ë¾)  
        ......

ÇóÒ»¸öSQLÓï¾ä - MS-SQL Server / »ù´¡Àà

×Ö¶Î1,×Ö¶Î2.....×Ö¶ÎN,Status,ParentID
1,Name1....test1,1,99
1,Name1....test1,3,99
1,Name2....test2,1,101
1,Name2....test2,3,101
1,Name3....test3,2,101
1,Name1....test1,4,101
ÏëÒªµÄ½á¹ûÊÇ:
1,Na ......

Çë½ÌSQLSERVERµÄÁ½¸öÎÊÌâ - MS-SQL Server / ÒÉÄÑÎÊÌâ

1¡£ÔõÑùʹxp_cmdshellÄÜÍêÕûÊä³ö³¬¹ý255¸ö×Ö·ûµÄ×Ö·û´®¡£
2¡£select ʱ£¬¼ìË÷ËÙ¶ÈÊÇÓëfromºóµÄ TABLE˳ÐòÓйأ¬»¹ÊÇÓëwhereÌõ¼þµÄ˳ÐòÓйØ(TABLEÊý¾Ý¶àÉÙ )
ÔÚϵͳÊôÐÔÉ趨ÀïÓиöÑ¡Ïî,¿ÉÒÔÐ޸ĵ¥×Ö¶ÎÊä³ö×ÖÊýÏÞÖÆ. ......

Ò»Ìõ SQL - Oracle / »ù´¡ºÍ¹ÜÀí

ÓÐÕâÑùÒ»ÌõSQL
 Select Get_Costtaxrate(col1), Get_Tcostvalue(col1) from a
 
ÆäÖÐGet_Costtaxrate¡¢Get_Tcostvalue¶¼ÊǺ¯Êý£¬ÕâÁ½¸öº¯ÊýÀïÃæ¶¼ÊDzéÕÒÒ»¸ö´ó±í£¬Get_Tcostvalue»¹ÐèÒªµ÷ÓÃGet_C ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ