可能还有别的方法。
select objectid, objectname from ridadbf.dbc ;
where allt(objecttype)=='Table' into cursor tablename
select t1.* ;
from ridadbf.dbc t1 ;
where allt(objecttype)=='Field' ;
into cursor fieldname
select t2.objectname as tablename, count(*) as fieldcount ;
from fieldname t1, tablename t2 ;
where t1.parentid=t2.objectid ;
into cursor tablefieldcount ;
group by t1.parentid