capture output of table-valued function
You can also do SELECT...INTO, Use the table in a join or use APPLY, eg

SELECT *
INTO #tmp
FROM [dbo].[ufn_MyFunction] ( 1 )

SELECT *
FROM [dbo].[ufn_MyFunction] ( 1 ) f
    INNER JOIN someOtherTable t ON f.RowId = t.rowId

SELECT *
FROM someOtherTable t
    CROSS APPLY [dbo].[ufn_MyFunction] ( t.rowId ) f