An Illustrated Guide to the SQL Self-Join

What is an SQL self-join and how does it work? When should it be used? We’ll provide answers to those questions! In SQL, we can combine data from multiple tables by using a JOIN operator. JOIN has several variants; we’ve already discussed CROSS JOIN, INNER JOIN, and OUTER JOIN. Most of the time, these operators join data from two or more different tables. In this article, however, we will explain how to join records from the same table. A self-join

Continue Reading

What Is Vertabelo’s SQL Cheat Sheet?

Everyone, from rookie programmers to SQL ninjas, needs a bit of help now and again. Enter Vertabelo’s SQL Cheat Sheet! Working with databases is hard. There’s a lot of data to manage, which can be daunting. But the main challenge many database users face is the SQL commands themselves. It’s all right when you’re using the same familiar ones day after day, but what about the commands you dust off once or twice a year? Or what if you’re just

Continue Reading

An Illustrated Guide to the SQL INNER JOIN

What is an SQL INNER JOIN, and how does it work? Let’s find out! In my last article, I discussed the CROSS JOIN operation in SQL. Today, we’ll look at INNER JOIN and how to use it. Is it the same as a JOIN? How many tables can you link with an INNER JOIN? These are all good questions. Let’s look at the answers! What Is an INNER JOIN? INNER JOIN combines data from multiple tables by joining them based

Continue Reading

An Illustrated Guide to the SQL CROSS JOIN

What is an SQL CROSS JOIN statement? When should you use it? When shouldn’t you use it? OKThis post will tell you what you need to know about CROSS JOIN. You already know that you can use the SQL JOIN statement to join one or more tables that share a matching record. And if you’re read the Vertabelo Academy post Learning SQL JOINs Using Real Life Situations, you know that there are many types of JOINs. Which one you choose

Continue Reading

Using CASE with Data Modifying Statements

What happens when you combine CASE with SQL’s data modifying statements? Find out in this article. The CASE expression is a very useful part of SQL and one that you’ll employ frequently. We’ve already covered what the CASE expression does, how to format it, and how to use it in a SELECT statement in “Using CASE to Add Logic to a SELECT”. Another article, “How to Sort Records with the ORDER BY Clause” demonstrated how to use CASE in an

Continue Reading

GET ACCESS TO EXPERT SQL CONTENT!