Skip to content
Simple SQL Tutorials

Simple SQL Tutorials

Your guide to querying and developing SQL Server databases

  • Home
  • Tutorials
    • The Basics
    • Transactions
    • Normalization
    • Querying data
    • Developing Databases
    • SQL Questions
    • Identity Property
    • JOIN
    • Data Types
    • Stored Procedures
    • Window functions
    • Data Definition Language
    • Views
    • Constraints
    • Set Operators
    • Table Expressions
    • Error Handling
    • Functions
    • Indexes
    • Triggers
  • Products
  • Contact
  • Privacy Policy
  • About

The Basics

SQL Server WHILE loop: A decision structure you should know

Posted on June 9, 2021October 8, 2022 by Josh D
SQL Server WHILE loop: A decision structure you should know

Reading Time: 7 minutesThe WHILE loop is one of the most basic tools you should know when you are first starting out with Microsoft SQL Server. Sometimes when working with SQL Server, you need certain code to execute several times in a loop while some condition is true. As soon as that condition Continue Reading

Posted In Stored Procedures, The Basics

SQL Server Wildcards: The 5 wildcards you need to know

Posted on June 9, 2021October 8, 2022 by Josh D
SQL Server Wildcards: The 5 wildcards you need to know

Reading Time: 9 minutesYou are the manager of a new up-and-coming hardware store in the city of Denver, Colorado. You are speaking with a new customer who says they own a woodworking business, and enjoy shopping at your store very much. They plan on being a regular customer, which you know will bring Continue Reading

Posted In Querying data, The Basics

The difference between COUNT(*) and COUNT(column): Answered!

Posted on June 8, 2021October 8, 2022 by Josh D
The difference between COUNT(*) and COUNT(column): Answered!

Reading Time: 6 minutesWhen I was first starting out with SQL Server, I had a hard time understanding the difference between COUNT(*) and COUNT(column), and how they are used with the GROUP BY clause. Many times, the COUNT(*) function would return the same results as the COUNT(<column>) function, so I just told myself Continue Reading

Posted In Querying data, SQL Questions, The Basics

SQL Server NULL: Are you making these 7 mistakes?

Posted on June 8, 2021October 7, 2022 by Josh D
SQL Server NULL: Are you making these 7 mistakes?

Reading Time: 11 minutesA 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

Posted In Data Types, Querying data, The Basics

The IF…ELSE IF….ELSE Statement: Everything You Should Know

Posted on May 24, 2021October 6, 2022 by Josh D
The IF…ELSE IF….ELSE Statement: Everything You Should Know

Reading Time: 8 minutesThe 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

Posted In The Basics

HAVING Clause: How it works

Posted on May 17, 2021June 30, 2022 by Josh D
HAVING Clause: How it works

Reading Time: 6 minutesThe 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

Posted In Querying data, The Basics

GROUP BY clause: A How-To Guide

Posted on May 10, 2021August 19, 2022 by Josh D
GROUP BY clause: A How-To Guide

Reading Time: 9 minutesWhen 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

Posted In Querying data, The Basics

The B-Tree: How it works, and why you need to know

Posted on May 3, 2021June 30, 2023 by Josh D
The B-Tree: How it works, and why you need to know

Reading Time: 11 minutesIf 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

Posted In Indexes, The Basics

Set Operator Precedence: Explained

Posted on April 12, 2021June 30, 2022 by Josh D
Set Operator Precedence: Explained

Reading Time: 7 minutesIn 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

Posted In Querying data, Set Operators, The Basics

SQL Server EXCEPT: Everything You Need to Know

Posted on April 5, 2021June 30, 2022 by Josh D
SQL Server EXCEPT: Everything You Need to Know

Reading Time: 10 minutesIn this tutorial, we’re going to learn about a very common Set Operator you should know: The EXCEPT Set Operator. 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 Continue Reading

Posted In Set Operators, The Basics

Posts pagination

Previous 1 … 4 5

Tutorial Categories

Navigation:

Home » The Basics » Page 5

Sign up for our newsletter!

Recent Posts

  • “Why should I save my query as a View instead of a .SQL file?” Answered!
  • SQL Server DELETE vs. TRUNCATE: What’s the difference?
  • SQL Server COALESCE System Function: How It Works
  • Can we create indexes in table variables? YES WE CAN!
  • SQL Server WINDOW Clause: Explained!
Copyright All rights reserved | Theme: Flash Blog by Unitedtheme.
SimpleSQLTutorials.com uses cookies to provide the best experience on our website through tailored advertising. By clicking Accept, you agree to our use of cookies.AcceptPrivacy policy