SQL Access group by 使用注意事项
在MS SQL 中正常的语句:
select Field1,sum(Field2) as Field2n from Tables where group by Field1 order by Field2 desc
在Access中会报错:
主要原因是受后缀:order by 的影响,它会把order by 的参数当做合计函数的一部分,应该改成:
select * from ( select Field1,sum(Field2) as Field2n from Tables where group by Field1 ) order by Field2 desc
创建时间:2023.01.05 更新时间:
标签:group,Field2,Field1,Access,SQL,order From: https://www.cnblogs.com/guorongtao/p/17026589.html