access查询语句

来源:百度知道 编辑:UC知道 时间:2024/06/04 23:17:58
select * from aa where lei2=0,lei2使数字型。
我在sql视图有查询结果,但运行页面报类型不匹配。请教这个sql在access中怎样写?

select * from aa where lei2=0;
lei2是数字型的在access中就是这么写的,没有错误。
你可以把这一句直接放到access里查询一下试试,看能否查出东西来。

select * from aa where lei2=0;
对的

加个又引号
select *form aa where lei2="0" 试试看

确认 你的数据库中 lei2 字段是数字型?
若是的话就没问题