Home Forums SQL Server 2008 T-SQL (SS2K8) Can a multistatement table-valued function return a user-defined table type TABLE? RE: Can a multistatement table-valued function return a user-defined table type TABLE?

  • Looking at the history, Microsoft added Tables as a return type in 2005. They added user-defined table types in 2008 so maybe Microsoft never went back extend the grammar. Perhaps it was too much effort. The documentation examples for passing tables as arguments really pushes us to use user-defined table types - that's why this limitation surprises me.

    I'm a control freak over parameters. I require developers to use parameter names that match column names; that way I can run automated checks to make sure data types and lengths match before deploying to production.

    Passing input, readonly tables is so powerful and object oriented, I love it.