1:我想得到表中一共有多少条记录
我用select count (*) from tabel
然后我用fields[0].asinteger取不出相应的值 应该怎么做啊
2:我想得到表中字段的最大值(字段类型为整形)
select max('字段名')from tabel
同样不知道怎么取出结果显示出来
我用select count (*) from tabel
然后我用fields[0].asinteger取不出相应的值 应该怎么做啊
2:我想得到表中字段的最大值(字段类型为整形)
select max('字段名')from tabel
同样不知道怎么取出结果显示出来
例如:showmessage(filed[0].asstring);
query.open;query.FileByName('count').asstring;//记录数
query.sql.text:='select * from table1';
query.Open;
query.recordcount;//记录数query.sql.text:='select max('field') as max from ...';query.fieldByname('max').asstring;//最大值
query.open;
query.last;
query.fieldByname('field').asstring;//最大值
query.active := true的