怎么把一个表中的一个字段中的最大值付给一个变量 参考: query1.sql.text:='select max(abc) as kkk from table1' query1.open; v1:=query1['kkk']; query1.close 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 在存储过程中:select @a=max(field) from ....在D中:Query1.SQL.Add('select max(xx) from ...'); Open; a:=Query1.Fields[0].AsInteger; select ;value=Max(No) from tablename where ......最大值保存在变量 value 中。 qryMaxID.Close; qryMaxID.SQL.clear; qryMaxID.SQL.Add('select Max(id) from pagertype'); qryMaxID.ExecSQL; MaxID := qryMaxID.Fieldbyname(id).asinteger;不能获得相应的值为什么啊 qrymaxid.execsql不能返回结果,要返回结果用open或active 为什么啊 这么获取edit.text的值?? 求翻译 新手求教,help! 在d7中怎么安装fastreport 2.5 如何判断表的存在 程序停止运行的问题!! 关于Delphi6数据库的问题 请问用FastReport怎么控制POS机的打印,详细内容请进 哪里有InstallSheild Develpor 7.x或者8.x下载 为什么获得不到combobox的值? 谁有类示netmeeting功能的控件。 delphi语法---stored的用法
Open;
a:=Query1.Fields[0].AsInteger;
最大值保存在变量 value 中。
qryMaxID.SQL.clear;
qryMaxID.SQL.Add('select Max(id) from pagertype');
qryMaxID.ExecSQL;
MaxID := qryMaxID.Fieldbyname(id).asinteger;
不能获得相应的值为什么啊