hkhurus(野牛哥哥) 我的语句就和你说的一样,不过我是想在delphi中把汇总数据给读出来 比如 select type, price from titles order by type, price compute sum(price) by type 显示结果 type price ------------------------------- mod_book 2.9900 mod_book 11.9900 ......... sum -------------- -------------- 70.8700我现在是想把 sum(price) 的统计结果给读出来,有办法吗?
select type, sum(price) from titles order by type, price group by type但这样不能取出每个 price 而以. 如果只要汇总数据就行了...... 这其实只有一张表.compute sum(price) by type 用DELPHI取不出来
我的语句就和你说的一样,不过我是想在delphi中把汇总数据给读出来
比如 select type, price
from titles
order by type, price
compute sum(price) by type
显示结果
type price
-------------------------------
mod_book 2.9900
mod_book 11.9900
......... sum
--------------
--------------
70.8700我现在是想把 sum(price) 的统计结果给读出来,有办法吗?
from titles
order by type, price
group by type但这样不能取出每个 price 而以.
如果只要汇总数据就行了...... 这其实只有一张表.compute sum(price) by type 用DELPHI取不出来