asp查询access问题

来源:百度知道 编辑:UC知道 时间:2024/05/16 19:26:07
能不能用数字字段编号来计算数字相同的一共有几条记录???
比如说我的数据库里的字段"id_no"是数字字段,我要查询"id_no"中有几条记录等于2的记录?
先谢了下面二位,不过我试了,但不行,可能ACCESS不适用吧,
好像要用这个Rs.recordcount吧,但我不会用,请教!

select count(id_no) from 表名 where id_no=2
绝对可以!

显示多少条的时候就用
response.write(rs(0))

select * from table where id_no=2
也可以
response.write(rs.recordcount)

sql=\"select * from table where id_no=\"& 2 &
rs.recordcount

select count(id_no) from 表名 where id_no=2

select count(*) from 数据表名称 where id_no=2