请问这个应该怎么使用like?谢谢 select * from table where field1 in ('1','2','3','12','4') 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select * from table where x like '%,2,%' select * from T1 where ( col like '2*' or col like '*,2,*')and col not like '*,?2,*'and col not like '*,2?,*'and col not like '?2*'and col not like '2?*'and col not like '*,?2*'and col not like '*,2?' "包含有2的记录,而不包括12及其他"1.是不是包含2,不包含12及其它有2的,e.g:23、42"x字段值类似为'1,2,3,12,4' "2.里面的数字长度固定吗,是不是都为不超过两位数的数 上面的不行吧.select * from table where ','+replace(x,' ','')+',' like '%,2,%' select * from table where x like '%2%'and x <> '12' select * from table where x like '%2%'and charindex('12',x)=0 不好意思,有些人误会我的意思了,我这里的数可变的,查询时之所以加了两个逗号,是为了区别2,12还有1,13类似的数,即某一位相同而整个不同的数,请再帮我想想,谢谢,而且是access,是不是不支持%,而应该是*吧? 浮点型数据经过一个函数处理后被四舍五入了 VBA中,如何从sqlserver中导数据到access中? SQL中可以修改列级完整性约束吗? sql server 安装程序无法将用户NT AUTHORITY、SYSTEM添加到本地组??? 出个题考考大家 这个扩展存储过程怎么写 UNPIVOT 分组问题 数据库新手的问题,请各位高人指点 多表查询问题向大家请教 关于Sql Server2000 Datetime类型插入值. 谢谢 巨难问题, sql数据库使用本机名字可以连接,使用IP不能连接 我修改了数据库方面的很多东西,例如触发器,视图,还有存储过程什么的!有的连表结构都改变了!
and col not like '*,?2,*'
and col not like '*,2?,*'
and col not like '?2*'
and col not like '2?*'
and col not like '*,?2*'
and col not like '*,2?'
1.是不是包含2,不包含12及其它有2的,e.g:23、42
"x字段值类似为'1,2,3,12,4' "
2.里面的数字长度固定吗,是不是都为不超过两位数的数