join

SQL JOIN (INNER JOIN)

SQL JOIN (INNER JOIN)

The INNER JOIN clause combines rows from two or more tables based on a related column between them.

Example of INNER JOIN

SELECT Users.first_name, Users.last_name, Orders.order_date
FROM Users
INNER JOIN Orders ON Users.user_id = Orders.user_id;
    

This query retrieves the first and last names of users, along with their order dates, by joining the "Users" and "Orders" tables based on the user ID.