在query1中的SQL中
select * from customer,country where customer.country(+)=country.name
order by country.name
在datasource1中的dataset加query1
dbgrid中加的datasource中加datasource1
希望对你有帮助
设:已有表为: aaa,bbb,ccc 关键字字段为 keyfield
with query1 do begin
sql.clear;
sql.add('select aaa.keyfield,bbb.keyfield,ccc.keyfield from aaa,bbb,ccc');
open;
end;
datasource1.dataset:='query1';
dbgrid1.datasource:='datasource1';
ok?