Skip to content

All-Access: every lesson, no ads. $8.25€8.25US$8.25$4.08US$4.08$2.41US$2.41₹224.91MX$74.91 a month, billed yearly. Free to start. Cancel any time

See plans
All-Access, no ads: every lesson, course and template. $8.25€8.25US$8.25$4.08US$4.08$2.41US$2.41₹224.91MX$74.91 a month. + GST at checkoutSee the plans →

<code>RIGHT JOIN</code> is similar to <code>LEFT JOIN</code>, but reversed. All rows from the second (<b>right</b> of <code>JOIN</code>) table appear in the results, and only rows from the first ("left") table with matches to the second table appear. The non-matching rows will show null. Try:<br><br>

Table companies

company_idcompany_nameheadquarters
1AppleCupertino
2MicrosoftRedmond
3GoogleMountain View
4AmazonSeattle
5MetaMenlo Park
6NetflixLos Gatos

Table employees

employee_idemployee_namecompany_id
1Alice Chen1
2Brian Lee3
3Carla Gomez2
4David Kim7
5Elena Rossi4
6Frank Moorenull
7Grace Patel5

RIGHT JOIN - SQL Practice Online

Practise RIGHT JOIN with 10 interactive SQL exercises. You type real queries into your browser and get instant feedback on every answer - no database setup and no install. It is a fast, hands-on way to learn SQL online and build query skills you can use at work.