在函数内的'INSERT EXEC' 中对带副作用的或依赖于时间的运算符的使用无效。

 

以下例子是错误的,改成存储过程。

create function f_cid(@taskid varchar(100),@str1 varchar(100)) 
returns @t_level table(abc varchar(50) )
as
begin
  insert into @t_level execute sp_GetValue @taskid,@str1,''
  return
end

另:函数也不能创建临时表,create  table  #tab。

 

相关文章:

  • 2022-02-28
  • 2022-12-23
  • 2021-07-16
  • 2022-02-21
  • 2022-02-15
  • 2022-12-23
  • 2021-10-27
猜你喜欢
  • 2021-09-19
  • 2022-12-23
  • 2021-11-27
  • 2021-09-04
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案