t-sql

This is one of several posts on modernizing T-SQL code with new features and functionality available in SQL Server. Last year, you finally retired the last of your SQL Server 2008R2 instances. Congratulations! But are you taking advantage of everything that your new instances have to offer? Unless you did a review of all of…

Read More Modernizing Your T-SQL: The Sequence Object

This is the first of several posts on modernizing T-SQL code with new features and functionality available in SQL Server. Last year, you finally retired the last of your SQL Server 2008R2 instances. Congratulations! But are you taking advantage of everything that your new instances have to offer? Unless you did a review of all…

Read More Modernizing Your T-SQL: Splitting Strings

This month’s T-SQL Tuesday is hosted by Bert Wagner and he asks us to write about code we’ve written that we would hate to live without. First off, “hate” is a pretty strong word so let’s go with “code you couldn’t bear to live without”. The first bit of code I couldn’t live without is…

Read More T-SQL Tuesday #104 – Code You Would Hate To Live Without

Triggers can be really useful in your database but you have to be careful with them. We often use them to record history to a separate table (at least, until we can implement temporal tables) or keep track of when a record was last updated. It’s usually implemented via an AFTER UPDATE trigger. Several times…

Read More Triggers vs. Default Constraints: Choose Wisely