Syntax

SQL Inner Join Syntax

In SQL, inner join: returns rows with matches in both tables — SELECT * FROM orders o JOIN users u ON u.id = o.user_id;

Quick Answer

Syntax
SELECT * FROM orders o JOIN users u ON u.id = o.user_id;
SQLSyntax

Inner Join

Code example
SELECT * FROM orders o JOIN users u ON u.id = o.user_id;

Returns rows with matches in both tables.

Learn More

How to inner join in SQL

  1. Open your SQL file or editor.
  2. Copy the example, then replace its sample names and values for your code.

SQL Inner Join Syntax

Use SELECT * FROM orders o JOIN users u ON u.id = o.user_id;.

Related Syntax References

Frequently asked questions

What is the SQL syntax for inner join?

Use this pattern: SELECT * FROM orders o JOIN users u ON u.id = o.user_id;

Can I copy this SQL code example?

Yes. Use Copy code and adapt the example to your program.

Is this SQL syntax different on Mac or Windows?

No. The language syntax is the same across operating systems.

Official source · How we verify