sqlfriends (11/7/2016)
A further question, if function are not worked efficiently, why T_SQL has this table valued functions?In which case we should create functions?
I can think of is for calculation, parse, and then code reuse.
Same reason they have Cursors, the FORMAT function (44 times slower that Cast/Converrt), the newer Date/Time datatypes, the PIVOT operator, HierarchyID, recursive CTEs that count, etc, etc... mostly marketing.