See why it pays to be consistent about always aliasing every table and every column in your query.
Bad Habits & Best Practices
This post explores what can happen if you are too liberal with permissions for the sake of convenience.
Let's talk about blindly clicking next, next, next during a SQL Server install.
IDENTITY columns are very useful, but consider whether they are needed on every single table.
I tried to deploy nested stored procedures that both had a cursor with the same name. It didn't go so well.
Find out about several bad things you may not even realize you're doing to dates and times in your own databases.
See why you should avoid some of the GUI elements in Management Studio.
Let's talk about a few of the ways people abuse and misuse DML triggers in SQL Server.
Read about some of the pitfalls of choosing the wrong data type in SQL Server.
In this post, I discuss some of the assumptions people make about IDENTITY columns.
One of many posts where I rant about how bad we are, collectively, at naming things.
I talk about how painful SELECT * can be, and how it can be like drinking from a fire hose.
See why your stored procedures should use OUTPUT and SELECT for data, and use RETURN only for error or status codes.
I talk about problems that can result from "problematic" characters in entity names.
Find out why you should always specify lengths for declarations of variable types like varchar.
A little wisdom on using sensible and logical aliases for your tables, instead of a / b / c / d.
See a couple of reasons you should stop using old join syntax (FROM t1, t2
).
See a few alternatives to expensive loops for populating sample or sequential data.
See why you should always use alias or column names in your ORDER BY clauses, rather than ordinal position.
Read about why you want to use statement terminators throughout all of your T-SQL code.
I present a laundry list of things I always do in stored procedures (and why).
While <> and != behave the same, there is one reason you may want to use the former instead of the latter.