Skip to content

Everything’s a CASE statement! #28

Open
@utterances-bot

Description

@utterances-bot

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

Activity

smilieface

smilieface commented on Jan 2, 2025

@smilieface

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Everything’s a CASE statement! · Issue #28 · chadbaldwin/chadbaldwin.github.io