Back to Yugabyte Db

EXCEPT

community/learn/content/01-SQL-Basics/02-fundamentals/15-except.md

2026.1.0.0-b25296 B
Original Source

SELECT with an EXCEPT

In this exercise we will query the orders and country tables and return the distinct rows from the first query that are not in the output of the second.

SELECT ship_country
FROM orders
EXCEPT
SELECT country
FROM suppliers;

This query should return 9 rows