Tag Archives: T-SQL

  1. Finding, disabling and enabling foreign keys

    2

    June 29, 2016 by Kenneth Fisher

    Foreign keys are a classic method of enforcing RI (Referential Integrity). Unfortunately though, they can get in the way if …
    Continue reading

  2. Perfectly Placed Parentheses

    14

    June 27, 2016 by Kenneth Fisher

    Like many other programming languages T-SQL uses parentheses () for a number of tasks. To help determine precedence, function calls …
    Continue reading

  3. Comparing the contents of two tables Redux

    Leave a comment

    June 8, 2016 by Kenneth Fisher

    I did a post the other day on comparing two tables. It was meant as a general overview but I …
    Continue reading

  4. Using LEN wrong.

    4

    June 2, 2016 by Kenneth Fisher

    I was reading someone’s question the other day on StackExchange and while the existing comments/questions solved the OP’s (original poster) …
    Continue reading

  5. Master_Views: master_objects, master_tables, etc

    Leave a comment

    May 23, 2016 by Kenneth Fisher

    There is a highly useful system view called sys.master_files. If you’ve never encountered it before it returns a list of …
    Continue reading

  6. How do I rename a column?

    2

    April 18, 2016 by Kenneth Fisher

    Everyone makes mistakes right? And sometimes you create an object and decide later that you messed up and need to …
    Continue reading

  7. Modulo!

    5

    April 14, 2016 by Kenneth Fisher

    I love this somewhat obscure mathematical operator. All it does is return the remainder of a division statement but even …
    Continue reading

  8. Name the schema when you create an object (or else)

    1

    April 6, 2016 by Kenneth Fisher

    This is one of those frequently ignored best practices. When you create an object, specify the schema where it will …
    Continue reading

  9. Complex/Conditional ORDER BYs

    1

    April 4, 2016 by Kenneth Fisher

    Typically it’s considered best to run your queries without an ORDER BY and let the application do any sorting needed. …
    Continue reading

  10. Why you shouldn’t use SELECT *

    1

    March 28, 2016 by Kenneth Fisher

    I answered an interesting question on SE today (ever notice how many posts come from stuff I read on forums?) …
    Continue reading

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

Join 1,224 other followers

Follow me on Twitter

ToadWorld Pro of the Month November 2013
Follow

Get every new post delivered to your Inbox.

Join 1,224 other followers