Reading Time: 11 minutes A proper understanding of NULL is absolutely essential for writing accurate queries that return accurate results. When you are first starting out with SQL Server, you might have these assumptions about NULL that are not quite right, or maybe flat out WRONG. If you misunderstand how SQL treats NULL, you Continue Reading
SQL Server character data types (and the differences between them)
Reading Time: 8 minutes When I was first learning how to query and develop databases using T-SQL, I would find myself confused between the different character (aka string) data types available to us. I would ask myself questions like: “What’s the difference between CHAR and VARCHAR?“ Or maybe: “What’s the difference between CHAR and Continue Reading
What’s the difference between JOIN and LEFT JOIN? This and other JOIN questions, answered!
Reading Time: 6 minutes When I was first learning how to query databases using T-SQL, I had some very basic questions about the different JOIN operations. I had questions like: “What’s the difference between a JOIN and a LEFT JOIN?” Or “What’s the difference between a regular JOIN and an INNER JOIN?” Or even Continue Reading
UNION and UNION ALL: What’s the difference?
Reading Time: 4 minutes Have you been working with SQL Server for a while, but aren’t really sure what the difference is between UNION and UNION ALL? When I was first learning T-SQL, I wondered this myself. I eventually figured it out, and I was glad to see the difference is very easy to Continue Reading
The IF…ELSE IF….ELSE Statement: Everything You Should Know
Reading Time: 8 minutes The IF…ELSE and the IF…ELSE IF…ELSE structures are the most basic decision structures you should know if you are just starting out with SQL or any other programming/query language. If you are familiar with other languages besides SQL, you will already be familiar with the concept of decision structures. But Continue Reading
HAVING Clause: How it works
Reading Time: 6 minutes The HAVING clause is a very useful tool we can use when querying SQL Server databases. When I was first learning SQL, I had a tough time understanding the HAVING clause. Looking back, I’m not sure what was so difficult to understand. It’s actually very simple. Are you struggling to Continue Reading
GROUP BY clause: A How-To Guide
Reading Time: 9 minutes When you are first learning how to query SQL Server databases, you might find yourself thoroughly confused by the GROUP BY clause. I know I was, for sure. You might ask yourself questions like: “What columns am I allowed to use in the SELECT list?” “Can I put more than Continue Reading
The B-Tree: How it works, and why you need to know
Reading Time: 11 minutes If you had to explain what a B-Tree is and how it works, could you do it? I mean, you know it’s a thing in SQL Server, and it is part of indexes (…somehow), but do you really know what it is? Wood you beleaf me if I told you Continue Reading
Set Operators in SQL Server: The Ultimate Guide for Beginners
Reading Time: 9 minutes SQL Server Set Operators are one of the more common tools we have available to us when querying SQL Server databases. It is important you know how to write them and how they work. Set operators are part of the Top 6 tools you should know for writing AWESOME Select Continue Reading
Set Operator Precedence: Explained
Reading Time: 7 minutes In this tutorial, we will discuss a very useful topic you should know when querying SQL Server databases: Set Operator precedence. The three set operators available to us in SQL Server are UNION, INTERSECT, and EXCEPT. I have in-depth tutorials on all 3 different set operators, found there: The UNION Continue Reading