when to use Multi-statement table-valued function code example Example: execute table valued function in sql SELECT * FROM udfProductInYear(2017);