Category: TSQL

Another reason that T-SQL beats the GUI

In IT, we have a few very solid and universal principles that no one ever argues with.  The first of these is Cover Your Ass (CYA). CYA is so universal and popular because things go wrong, blame gets thrown, and DBAs find themselves under a metaphorical bus.  Nobody likes the underside of that bus. It’s […]

Applied SQL: Demonstrate Simple Backup and Restore

Let’s apply a little backup and restore knowledge, eh wot? I introduce this whole concept in Applied SQL: You Have Homework. Find all assignments on the Applied SQL page. Prerequisites: basic T-SQL, create objects/data, basic understanding of recovery models and backup types. Reading – SQL Server Books Online articles: Backup (Transact-SQL) Restore (Transact-SQL)  ALTER DATABASE […]

Great Tools for Formatting T-SQL

I have a big rant I add to….well, to every single SQL session I give. That rant is on formatting code. You see, (I say,) you can’t even begin to understand or optimize a query if it’s not formatted…and by “formattted”, I mean breaking out query clauses onto different lines, indenting column lists, etc etc. […]