奥比岛服装图片大全:Access里运行SQL语句的问题

来源:百度文库 编辑:杭州交通信息网 时间:2024/04/28 21:59:25
我现在想在Access里运行SQL语句
达到我的筛选目的,共3个字段,我的条件如下
一,字段name里有“成都”
二,字段tel里有“028”
三,字段mobile不为空的记录,即必须要有手机号的记录我才要
以上三个条件同时满足的记录才是我要的,请问这个SQL语句
应该怎样写? 注意我要用模糊查询,大概是用like吧
感谢各位提供的答案,但我一一拿进去试了,都说语法错误,表名我是写成我的表名了的,想不通,各位写的应该都没有错,为何要说语法错误呢?

select * from tablename where name like'%成都%' and tel like'%028%' and mobile is not null

select * from [tablename]
where name like '#成都#'
and tel like'#028#'
and mobile not is null

直接在access里面的通配符是#号

select * from tablename where name like '%成都%' and tel like '%028%' and mobile<>''
你这样写写试试,不能用再找我

select * from 你的表命 where name like'%成都%' and tel like'%028%' and mobile not is null

tabledb是你要查询数据表的名字
sql="select * from tabledb where name like %程度% and tel like %028% and movile not is null"
rs.open sql,2,3

select *
from S
where name=%成都% and tel=028% and mobile!=NULL