How to execute Table valued function

前端 未结 2 1463
醉梦人生
醉梦人生 2020-12-28 11:18

I have following function which returns Table .

create Function FN(@Str varchar(30))
  returns
  @Names table(name varchar(25))
  as 
  begin 

      while (         


        
相关标签:
2条回答
  • 2020-12-28 11:57

    You can execute it just as you select a table using SELECT clause. In addition you can provide parameters within parentheses.

    Try with below syntax:

    SELECT * FROM yourFunctionName(parameter1, parameter2)
    
    0 讨论(0)
  • 2020-12-28 11:58

    A TVF (table-valued function) is supposed to be SELECTed FROM. Try this:

    select * from FN('myFunc')
    
    0 讨论(0)
提交回复
热议问题