首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > ASP >

求INSTR句-在线,该怎么解决

2012-02-19 
求INSTR句-----在线select*fromxxxxwhereINSTR( , +SpecialID+ , , ,159, ) 0andIsChecked0orderbyhitsd

求INSTR句-----在线
select   *   from   xxxx   where   INSTR( ', '+SpecialID+ ', ', ',159, ')> 0   and   IsChecked=0   order   by   hits   desc

SpecialID 字段     记录159
我再想求.SpecialID记录158要怎么求.
就是同时求   出 159   和158的记录
在线急......................

[解决办法]
select * from xxxx where SpecialID in(159,158) and IsChecked=0 order by hits desc
[解决办法]
select * from xxxx where (INSTR( ', '+SpecialID+ ', ', ',159, ')> 0 or INSTR( ', '+SpecialID+ ', ', ',158, ')> 0) and IsChecked=0 order by hits desc

热点排行