Check out example codes for "sql server: how to assign value to table variable returned from function". It will help you in understanding the concepts better.

Code Example 1

INSERT INTO @tableVariableName
SELECT * FROM <schemaName>.<functionName>([@parameters_names, ..])

Learn ReactJs, React Native from akashmittal.com