update pro set A = T.point from ( select id,dbo.function(id) as point from pro)T where T.id = id lz给些数据和你要求的结果样式
create table tb (id int,a bigint) insert tb select 1,1 union select 2,2 union select 3,3create function f_fun_name() returns @tb table (id int,a bigint) as begin insert @tb select id,A*100 from tb return ; end update tb set a=b.a from (select * from f_fun_name()) b where tb.id=b.id select * from tb /* id a 1 100 2 200 3 300 */ drop table tb
set A = T.point
from (
select id,dbo.function(id) as point
from pro)T
where T.id = id
lz给些数据和你要求的结果样式
insert tb select 1,1 union select 2,2 union select 3,3create function f_fun_name()
returns @tb table (id int,a bigint)
as
begin
insert @tb select id,A*100 from tb
return ;
end
update tb set a=b.a from (select * from f_fun_name()) b where tb.id=b.id
select * from tb
/*
id a
1 100
2 200
3 300
*/
drop table tb