Category: Beginner

Easy SQL mistakes: Accidental Correlated Subquery

Just a fun note, because it was a moment of pure puzzlement for me. I’m writing a new SP for Minion Backup (you knew it had to be Minion related, didn’t you?) and I just got the oddest error. Here’s how it went. First, I got a list of backups from the log: SELECT ExecutionDateTime , Status , PctComplete , […]

Shrink a log file…AUTOMATICALLY?

Today let’s talk about shrinking log files, and Minion Backup – still totally & forever free – and how they go together. First things first: why would you want to shrink a log file in the first place? Haven’t we heard that shrinking files is bad? Well, no and yes. No, shrinking log files – […]

Fun with Operator Precedence

Let’s have some fun with operator precedence today. Specifically, logical operator precedence. Specifically, how is it evaluated when your where clause says “WHERE This AND That OR Something AND that”, without any clarifying parenthesis? Let’s play around with this. The simplest test scenario is a SELECT 1. If I get a 1 back, that means my WHERE clause evaluated […]