Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • 1
    Thanks for the answer. So basically, the multi-statement is only really to be used when the function is more complicated than is feasible to do in a inline function, for the sake of readability? Are there any performance benefits at all to multi-statement? Commented Mar 31, 2010 at 15:52
  • I don't know, but I wouldn't think so. It is probably better to let sql server figure out the optimizations that you might try to make manually (by using variables, temp tables, or whatever). Though you could certainly do some performance testing to prove/disprove this in specific cases. Commented Mar 31, 2010 at 15:56
  • Many thanks again. I may look further into this when I have more time! :) Commented Mar 31, 2010 at 16:03