T-SQL

My SQL Server Development Toolbox

Having the right tools for the job makes the work much more efficient. However, for those just starting out in SQL Server land, it may not be clear which tools are useful or appropriate for a given task. I regularly field questions about which tools I use on my development machines, and why. To that end, I’ve compiled a brief…


Using NOT IN with NULL Values in T-SQL

Recently I discovered a little quirk in T-SQL when using NOT IN with NULL values in the list of values to check.  I use the term “quirk” loosely here because the behavior is exactly as designed in SQL Server, though it may not be obvious. Using NOT IN with NULL Values Here’s how it works. If you use a static…


SQL Injection… is this still a problem?

For some reason, today I came across at least a half-dozen blog posts and articles about how to avoid SQL injection attacks.  It had been a while since I had read about SQL injections, and an odd thought comes to mind: Why is SQL injection still an issue? This is such an easy problem to get around.  The use of…