Category Archives: T-SQL

  1. Identity in a SELECT

    4

    December 19, 2018 by Kenneth Fisher

    Always be learning right? So when I saw this I had to go HU?! That’s new. What’s going on here? …
    Continue reading

  2. Bulk insert and an identity column

    1

    December 12, 2018 by Kenneth Fisher

    TL;DR; BULK INSERT doesn’t have an easy way to specify a column list so the columns in the insert file …
    Continue reading

  3. My backup script (where, how, how big, etc.)

    4

    November 26, 2018 by Kenneth Fisher

    A while back I wrote about how to find where your backups are. And I’ve also written about I use …
    Continue reading

  4. SQL Homework – November 2018 – Constraints

    2

    November 5, 2018 by Kenneth Fisher

    You’ve created tables before but how about constraints? Constraints allow a finer level of control over what data is allowed …
    Continue reading

  5. Highlighting sp_spaceused

    Leave a comment

    October 15, 2018 by Kenneth Fisher

    I’ve been using sp_spaceused a lot recently so I thought I would bring it up again. Basically it’s a quick …
    Continue reading

  6. Which is faster? IN (list) or IN (SELECT FROM Temp)

    8

    October 11, 2018 by Kenneth Fisher

    If you’ve done much with IN (list) then you’ve realized that it basically translates out to You’ve probably also realized …
    Continue reading

  7. Generate a random number of children for each parent

    4

    October 3, 2018 by Kenneth Fisher

    I was asked an interesting question the other day. Is it possible to get a different random number of rows …
    Continue reading

  8. Escaping strings

    Leave a comment

    September 24, 2018 by Kenneth Fisher

    No, I’m not talking about that nightmare everyone has where a bunch of strings are chasing you across a loom. …
    Continue reading

  9. You can’t DELETE TOP (x) with an ORDER BY

    8

    September 19, 2018 by Kenneth Fisher

    Did you know you can’t do this? Msg 156, Level 15, State 1, Line 8 Incorrect syntax near the keyword …
    Continue reading

  10. Using Table Valued Parameters with sp_executesql

    3

    September 13, 2018 by Kenneth Fisher

    Recently I did a presentation on dynamic SQL. In the presentation I pointed out the similarity of using sp_executesql to …
    Continue reading

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

Join 2,484 other followers

Follow me on Twitter

ToadWorld Pro of the Month November 2013