sqlserver 自定义函数返回表类型
程序员文章站
2024-02-22 23:57:52
...
use WANSYSTEMDB
go
create function query_question_option(
@pid int
)
returns @temptale table
(
pid int ,
optionstr varchar(5000)
)
as
begin
declare @fullText varchar(5000)
set @fullText=''
select @[email protected]+oflag+soption+'>>' from question_option where [email protected]
insert into @temptale values(@pid,@fullText)
return
end