sql中的小問題. (10分)

  • 主题发起人 主题发起人 jeary
  • 开始时间 开始时间
J

jeary

Unregistered / Unconfirmed
GUEST, unregistred user!
with tempdataset do
begin
Close;
CommandText:='select sum(1+8)/2 as ba from ingoods where number='123456'';
Execute;
Open;
end;
showmessage(floattostr(tempdataset.fieldbyname('ba'))); //值等于4
為何?
 
你试试:
CommandText:='select sum(1+8)/2.0 as ba from ingoods where number='123456'';
 
To:happyloner
正确
 
后退
顶部