常用的不熟的sql语句
时间:2015-01-20 10:21:36
收藏:0
阅读:229
1.select * from dbo.Consum_AccountPaymentLog Where CHARINDEX(‘,1,‘,‘,‘+RelatedUserIDs+‘,‘)>0
charindex 在一个表达式中搜索另一个表达式并返回其起始位置(如果找到)。
之所以‘1’的两边加上‘,’号是为了防止‘11’,‘111’这样的数据扰乱搜索结果
原文:http://www.cnblogs.com/sunzgod/p/4235267.html
评论(0)