SQL Corgs Explain Inner Joins

Kendra Little | April 15, 2024

Joins are essential. The SQL Corgs introduce you to INNER joins in this animated short.

Sample code

Freyja and Stormy love sample code, although their typing isn’t the best. This works in SQL Server:

create table #stormy (name sysname, color sysname)
insert #stormy values ('rope', 'blue'), ('bone', 'blue'), ('lobster', 'red'), ('ball','orange')


create table #freyja (name sysname, color sysname)
insert #freyja values ('bone', 'orange'), ('rope', 'orange'), ('ball', 'blue'), ('duck','green')


select s.color, s.name, f.color, f.name
from #stormy AS s 
join #freyja as f on s.color=f.color;
GO
Copyright (c) 2024, Catalyze SQL, LLC; all rights reserved. Content policy: Short excerpts of blog posts (3 sentences) may be republished, but longer excerpts and artwork cannot be shared without explicit permission.