How to pass parameters to Table Valued Function

后端 未结 3 1097
甜味超标
甜味超标 2021-02-05 04:57

I want to do something like

select * from tvfHello(@param) where @param in (Select ID from Users)
3条回答
  •  孤独总比滥情好
    2021-02-05 05:05

    That looks ok to me, except that you should always prefix your functions with their schema (usually dbo). So the query should be:

    SELECT * FROM dbo.tvfHello(@param) WHERE @param IN (SELECT ID FROM Users)
    

提交回复
热议问题