update xx set w=sqrt(y/c-sqr(y)),g=randomize(100) where n=:n and y:=y 如果在sql2k中你可以改成这样: update xx set w=sqrt(y/c-sqr(y)),g=rand(100) where n=:n and y:=y
关于rand的种子值,请查看sql自带帮助
DELPHI可以,设两个变量。r1,r2; r1:=....; r2:=...; adoquery1.sql.add('update xx,set w='+floattostr(r1)+',g='+inttostr(r2)+' where .......');
轻松掌握SQL(第三版)中讲了可以用函数,应该是ACCESS不支持,对吗? to prgliker(程序爱好者) :你试验过吗?这与直接写有什么不同,出错信息是不认识函数! 注意-w,y,c,y均为xx表中的字段! 明晚结贴!!
支持的语句有限的
如果是,那哪些DBMS支持呢?
怎么ABS可以而上面的这些函数却不行呢?
如果在sql2k中你可以改成这样:
update xx set w=sqrt(y/c-sqr(y)),g=rand(100) where n=:n and y:=y
r1:=....;
r2:=...;
adoquery1.sql.add('update xx,set w='+floattostr(r1)+',g='+inttostr(r2)+' where .......');
to prgliker(程序爱好者) :你试验过吗?这与直接写有什么不同,出错信息是不认识函数!
注意-w,y,c,y均为xx表中的字段!
明晚结贴!!