Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lernen Retrieving Distinct Rows | Section
SQL Fundamentals
Abschnitt 1. Kapitel 4
single

single

bookRetrieving Distinct Rows

Swipe um das Menü anzuzeigen

Note that the SELECT statement returns all rows in a given column. However, what if we don't need all the values from a column, especially when they are duplicated, and we only need unique values?

For such cases, it is convenient to use the keyword DISTINCT, placed immediately before the column names. Let's take a look at an example:

12
SELECT DISTINCT region FROM country;
copy
Aufgabe

Swipe to start coding

Write an SQL query to retrieve distinct (unique) continent values from the country table.

Lösung

Switch to desktopWechseln Sie zum Desktop, um in der realen Welt zu übenFahren Sie dort fort, wo Sie sind, indem Sie eine der folgenden Optionen verwenden
War alles klar?

Wie können wir es verbessern?

Danke für Ihr Feedback!

Abschnitt 1. Kapitel 4
single

single

Fragen Sie AI

expand

Fragen Sie AI

ChatGPT

Fragen Sie alles oder probieren Sie eine der vorgeschlagenen Fragen, um unser Gespräch zu beginnen

some-alt