Open
Description
Everything’s a CASE statement! | Chad’s Blog
A lot of people may not realize that some of our favorite T-SQL functions are really just a little syntactic sugar underneath.
https://chadbaldwin.net/2024/07/30/everythings-a-case-statement.html
Metadata
Metadata
Assignees
Labels
No labels
Activity
smilieface commentedon Jan 2, 2025
Thank-you for an interesting and detailed post!
One additional thing related to ISNULL. If your either item passed in is defined as NOT NULL, that property gets returned in the metadata for the result set, but again that optimisation is missing from COALESCE, CASE and IIF (you can use sp_describe_first_result_set to show the properties).