select * from yourtable where name like '%,yourvalue,%'
union
select * from yourtable where name like 'yourvalue,%'
union
select * from yourtable where name like '%,yourvalue'
union
select * from yourtable where name like 'yourvalue,%'
union
select * from yourtable where name like '%,yourvalue'
解决方案 »
- 急求(表格自动增加一行)
- 有这样的建站方法吗:把数据库和网站代码放在不同的服务器上,通过网络远程访问另一台服务器上的数据库
- Gridview的模板列里加上Textbox控件 输入数据问题
- aspx页面中如何获取IMG的Src
- public static private 生命周期-----------拿分。
- 事关紧急~~~请大家帮下忙!!!
- #27楼说的对
- ================求:入门asp.net项目===============
- 水晶报表传值问题(急)
- 问一个非常简单的问题,进来抢分啊
- 在ASP.NET中如何将空值(NULL)传递给存储过程?
- 页面刷新自动添加记录,怎么解决这个难题??
union
select * from yourtable where name like yourvalue & ',%'
union
select * from yourtable where name like '%,' & yourvalue
name是你要查的字段
只要你的字段里有变量yourvalue的值,就可查到了
这条记录滿足要求,可不是我想要的
where
name not in('a','b','ac','dc')
and myvalue<>'c'