delphi7 dbgrid合计用法

procedure TForm1.FormShow(Sender: TObject);
begin
  with qry1 do
  begin


  close;
  sql.clear;
  sql.add( 'select  stuname,score   from   stuinfo,stuscore union  select ''合计'',sum(score) from stuinfo,stuscore order by score asc');
  open;
  active:=true;
    end;
end;

posted on   A大雄  阅读(554)  评论(0编辑  收藏  举报

努力加载评论中...

导航

点击右上角即可分享
微信分享提示