Fix My Functions: Speeding Up Scalar and Table Valued UDFs (video)
Last week, I presented on the topic of TSQL User Defined Functions (UDFs) in SQL Server at the PASS Summit.
Last week, I presented on the topic of TSQL User Defined Functions (UDFs) in SQL Server at the PASS Summit.
It’s TSQL Tuesday! If you’re not familiar, TSQL Tuesday is a monthly blogging event where a Microsoft Data Platform community member chooses a writing prompt. This is a great thing if you’re interested in starting a technical blog and wonder, “What would I write about?” It’s also great if, like me, you occasionally want a little outside inspiration to shake things up.
This month’s topic is from Steve Jones: we’re invited to write about an experience that we’ve had with triggers.
Last week’s quiz was on Table Value Constructors in TSQL.
Table value constructors let you create a dataset on the fly. These can occasionally be useful in writing queries, but I think playing with them has another benefit: they provide a simple, lightweight framework to let you develop your ability to think in sets.
Michelle asked a great question:
In your own words, why would one want to use a cross apply operator rather than a join operator? I’m old school, and I’m just not getting why a cross apply would be so much better to use than a join.
BREAK is a useful piece of control-of-flow language in SQL Server, but it only works in specific situations.
RETURN is a “control of flow” language keyword in Transact-SQL. It’s very useful for managing when code does – and does NOT – get executed in procedural code, and it can also be used to communicate the status from procedural code.
But not everyone knows how to use RETURN, and learning about it can be awkward because of some quirks of SQL Server Management Studio. It is well worth taking the time to get used to it, though!
My most recent Quizletter featured a quiz on ORDER BY in TSQL, complete with questions on the OFFSET and FETCH clauses which we got in SQL Server 2012.
One great thing about teaching TSQL School is that it reminds me of these cool options that can be easy to forget.
Copyright (c) 2025, Catalyze SQL, LLC; all rights reserved. Opinions expressed on this site are solely those of Kendra Little of Catalyze SQL, LLC. Content policy: Short excerpts of blog posts (3 sentences) may be republished, but longer excerpts and artwork cannot be shared without explicit permission.