Category Archives: T-SQL

  1. SQL Homework – October 2019 – Code review (self and peer)

    Leave a comment

    October 2, 2019 by Kenneth Fisher

    Every database person I’ve ever met writes at least some code at some point in their career. That code might …
    Continue reading

  2. When were the statistics last updated and how many rows were sampled?

    Leave a comment

    September 4, 2019 by Kenneth Fisher

    TL;DR; Final query is at the bottom. Every now and again (particularly when someone is having performance problems) I’ll get …
    Continue reading

  3. Setting Trigger Order

    Leave a comment

    August 26, 2019 by Kenneth Fisher

    If you can help it you probably shouldn’t be using triggers. But if you have to use a trigger you …
    Continue reading

  4. Why do DBAs dislike loops?

    5

    August 22, 2019 by Kenneth Fisher

    If you started out as a developer you were probably taught how important loops are. They are one of the …
    Continue reading

  5. Constructing a datetime from an integer date and an integer time.

    4

    August 15, 2019 by Kenneth Fisher

    Occasionally I’ve seen date and time stored separately as integers. This had some practical applications back before we had date …
    Continue reading

  6. Temporary stored procedures

    Leave a comment

    August 7, 2019 by Kenneth Fisher

    tl;dr; Temporary stored procedures are excellent for testing pieces of code that are going to go into (or come from) …
    Continue reading

  7. Optional vs Required parameters in Stored Procedures

    7

    July 29, 2019 by Kenneth Fisher

    If you are executing a stored procedure with a bunch of parameters it can be a bit of a pain …
    Continue reading

  8. Custom error messages

    1

    July 24, 2019 by Kenneth Fisher

    I’m sure lots of you have used the function RAISERROR to handle an error caused by your code. The problem …
    Continue reading

  9. Short circuiting an AND

    4

    July 15, 2019 by Kenneth Fisher

    The other day I did a post on how an OR short circuits. It was a somewhat unusual type of …
    Continue reading

  10. What permissions do temp stored procedures use?

    4

    June 19, 2019 by Kenneth Fisher

    In a performance tuning class I recently took with Brent Ozar (b/t) he mentioned temporary stored procedures and an interesting …
    Continue reading

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 2,542 other followers

Follow me on Twitter

ToadWorld Pro of the Month November 2013