2013-02-25 82 views

回答

3

是,您可以:

create function foo 
(
    @seed int 
) 
returns @foo_t table 
(
    [a] int not null, 
    [b] int not null, 
    [c] as ([a] + [b]) 
) 
begin 
    insert into @foo_t values (@seed, 2) 
    insert into @foo_t values (@seed + 1, 3) 

    return 
end 
go 

select 
    * 
from foo(1) 
go 
相關問題