asp中如何获得数据库中存在相同数据的记录数?

2024-12-26 23:36:04
推荐回答(3个)
回答1:

select fq,count(fq) as tt from order group by fq

下面的dingdan = ('"&dingdan&"')")括号什么意思?你去掉试试
set rs77=conn.execute("SELECT sum(fq) as cf FROM order GROUP BY cf where dingdan = '"&dingdan&"'")

回答2:

这个问题曾经遇见过!一般的解决方法是:

select distinct (某字段),字段2,字段3... from 表

回答3:

select count(*) from
(
select 字段 from 表
group by 字段
) as t