String str="select d.id,d.depname,a.id lb,a.name,count(*) sl,sum(t.new_value) yz,sum(t.value) xz,sum(t.new_value)-sum(t.value) jtzj from ASSET_BASIC t,asset_type a,department d where d.id = t.use_department_id and a.id=t.asset_type_id and t.use_department_id is not null and d.company_id = "+com.id+"group by d.id,d.depname,a.id,a.name order by d.id,d.depname,a.id,a.name"这是一个SQL查询。。怎么加上每页显示10条数据。
[code="java"]
select f.* from
( select e.*,rownum rowno from (
........(你的sql)
) e where rownum <= #end#
) f where f.rowno >= #start#
[/code]
end start分页数据