LogoInterview Master

SQL Learning

SQL INNER JOIN

INNER JOIN

Understanding SQL INNER JOIN

INNER JOIN is a fundamental SQL join operation used to combine rows from two or more tables based on a related column. It's perfect when you need to show data that has matching values in both tables.

Basic Syntax

SELECT columns
FROM table1
INNER JOIN table2 ON table1.column = table2.column;

Practical Example with TokTuk Dataset

Here's a practical INNER JOIN example using the TokTuk dataset:

-- Retrieve usernames and their corresponding video titles
SELECT u.username, v.title
FROM Users u
INNER JOIN Videos v ON u.user_id = v.user_id;

Ready to Practice SQL INNER JOIN?

Apply what you've learned in our interactive environment.

Loading SQL editor...