Category Archives: T-SQL
-
Perfectly Placed Parentheses
14June 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 -
Help! My backup file has doubled in size.
2June 16, 2016 by Kenneth Fisher
Help! I backed up my database yesterday and the backup file was about 200MB but today it’s closer to 400! …
Continue reading -
Comparing the contents of two tables Redux
Leave a commentJune 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 -
Using LEN wrong.
4June 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 -
Master_Views: master_objects, master_tables, etc
1May 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 -
Comparing the contents of two tables
16May 12, 2016 by Kenneth Fisher
I’ve been working on tuning a query for the last week and I’ve had to make several changes to the …
Continue reading -
How do I rename a column?
2April 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 -
Modulo!
7April 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 -
Name the schema when you create an object (or else)
1April 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 -
Complex/Conditional ORDER BYs
1April 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





