Now you Could try it yourself:

--First, we create a inline-table function which returns a table

Create Function dbo.ufnFunctionTest (@param int, @param1 int)

returns table

AS

RETURN

(

select 1 as id

)


--Then, we want to alter it to a multi-statement table-valued function,

--and we will get an error here

alter Function dbo.ufnFunctionTest (@param int, @param1 int)

returns @tt table

(

id int

)

begin

insert into @tt values (1)

return

end
if you really want to "alter" the type of your function, actually you need to drop it first, then create a new one.
解决方法:先删除ufnFunctionTest ,再创建ufnFunctionTest 。
http://www.cnblogs.com/xingyukun/archive/2008/05/21/1203711.html
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。