中的模式匹配
来源:互联网 发布:大数据安全就业 编辑:程序博客网 时间:2024/05/16 05:47
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
Author:DavidEuler
Date:2004/11/17
Email:de_euler-david@yahoo.com.cn
有任何问题,请与我联系:)
SQLServerBooksOnline上面搜索like,找到了包含%,_,[],[^]几个通配符。
如:select *frommybbswhereContentlike'[w]%'
like关键字用于搜索匹配某个模式的字符串,或者日期,时间值。
SQLServerBooks中的部分解释如下:
PatternMatchinginSearchConditions
TheLIKEkeywordusesaregularexpressiontocontainthepatternthatthevaluesarematchedagainst.Thepatterncontainsthecharacterstringtosearchfor,whichcancontainanycombinationoffourwildcards.
WildcardMeaning%Anystringofzeroormorecharacters._Anysinglecharacter.[]Anysinglecharacterwithinthespecifiedrange(forexample,[a-f])orset(forexample,[abcdef]).[^]Anysinglecharacternotwithinthespecifiedrange(forexample,[^a-f])orset(forexample,[^abcdef]).
Enclosethewildcard(s)andthecharacterstringinsinglequotationmarks,forexample:LIKE'%en%'searchesforallstringsthatcontainthelettersenanywhereinthestring(Bennet,Green,McBadden).
LIKE'_heryl'searchesforallsix-letternamesendingwiththelettersheryl(Cheryl,Sheryl).
LIKE'[CK]ars[eo]n'searchesforCarsen,Karsen,Carson,andKarson(Carson).
LIKE'[M-Z]inger'searchesforallnamesendingwiththelettersingerthatbeginwithanysingleletterfromMthroughZ(Ringer).
LIKE'M[^c]%'searchesforallnamesbeginningwiththeletterMthatdonothavethelettercasthesecondletter(Feather).
Thisqueryfindsallphonenumbersintheauthorstablethathaveareacode415:
SELECTphoneFROMpubs.dbo.authorsWHEREphoneLIKE'415%'
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 160x600, 创建于 08-4-23MSDN */google_ad_slot = "4367022601";google_ad_width = 160;google_ad_height = 600;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
Author:DavidEuler
Date:2004/11/17
Email:de_euler-david@yahoo.com.cn
有任何问题,请与我联系:)
SQLServerBooksOnline上面搜索like,找到了包含%,_,[],[^]几个通配符。
如:select *frommybbswhereContentlike'[w]%'
like关键字用于搜索匹配某个模式的字符串,或者日期,时间值。
SQLServerBooks中的部分解释如下:
PatternMatchinginSearchConditions
TheLIKEkeywordusesaregularexpressiontocontainthepatternthatthevaluesarematchedagainst.Thepatterncontainsthecharacterstringtosearchfor,whichcancontainanycombinationoffourwildcards.
WildcardMeaning%Anystringofzeroormorecharacters._Anysinglecharacter.[]Anysinglecharacterwithinthespecifiedrange(forexample,[a-f])orset(forexample,[abcdef]).[^]Anysinglecharacternotwithinthespecifiedrange(forexample,[^a-f])orset(forexample,[^abcdef]).
Enclosethewildcard(s)andthecharacterstringinsinglequotationmarks,forexample:LIKE'%en%'searchesforallstringsthatcontainthelettersenanywhereinthestring(Bennet,Green,McBadden).
LIKE'_heryl'searchesforallsix-letternamesendingwiththelettersheryl(Cheryl,Sheryl).
LIKE'[CK]ars[eo]n'searchesforCarsen,Karsen,Carson,andKarson(Carson).
LIKE'[M-Z]inger'searchesforallnamesendingwiththelettersingerthatbeginwithanysingleletterfromMthroughZ(Ringer).
LIKE'M[^c]%'searchesforallnamesbeginningwiththeletterMthatdonothavethelettercasthesecondletter(Feather).
Thisqueryfindsallphonenumbersintheauthorstablethathaveareacode415:
SELECTphoneFROMpubs.dbo.authorsWHEREphoneLIKE'415%'
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 160x600, 创建于 08-4-23MSDN */google_ad_slot = "4367022601";google_ad_width = 160;google_ad_height = 600;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
- 中的模式匹配
- AX中的模式匹配
- perl中的模式匹配
- Shell中的模式匹配
- Snort中的模式匹配!!!
- SQL中的模式匹配
- perl中的模式匹配
- awk中的模式匹配
- Swift中的模式匹配
- Swift中的模式匹配
- Swift中的模式匹配
- Scala中的模式匹配
- lua中的匹配模式
- scala中的正则匹配和模式匹配
- SQL Server中的模式匹配
- Sql Server 中的模式匹配
- 模式匹配中的kmp算法
- MySQL中的字符串模式匹配
- 9i迁移数据文件过程
- 最Cool、最容易使用的Linux-Ubuntu
- SQL注入的新技巧
- 关于表空间
- 的选型原则
- 中的模式匹配
- 从N个元素中取k个元素子集的c++实现
- 解决iPhone Installer不能安装问题
- 知道一个值jjfda,如何查找它在那个表,那个字段
- 从动态SQL中返回值
- 三大之间对比
- IsiSQLPlusrunning
- 在SQL中调用COM对象
- HP小型机故障诊断