select * from (
select
sum(a) ,b
from tablename
group by b
order by sum(a)
) where rownum<11;select * from tbname where ... for update;
select
sum(a) ,b
from tablename
group by b
order by sum(a)
) where rownum<11;select * from tbname where ... for update;
小弟还是不明白,select * from tbname where ... for update;
是什么意思?
为什么 top 关键词没有用?第2个问题呢?万望赐教
加 行级锁
select * from tbname where ... for update;
执行以后就可以编辑了
oracle 里面不行。
select YY.A,YY.B
FROM
(SELECT ROWNUM AS DD, WW.A ,WW.B
FROM
(select sum(a) AS A ,b AS B
from tablename
group by b) WW
) YY
WHERE 1<=YY.DD AND YY.DD<=10
order by YY.A
>查询结果的记录图表中修改数据,好像不行把;可以修改原始的表内容,点击表名之后右键‘edit’,但条件是管理员许可下。
from tablename
where rownum<11
group by b
order by sum(a)