Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Aprenda Retrieving Distinct Rows | Section
SQL Fundamentals
Seção 1. Capítulo 4
single

single

bookRetrieving Distinct Rows

Deslize para mostrar o menu

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
Tarefa

Swipe to start coding

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

Solução

Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 1. Capítulo 4
single

single

Pergunte à IA

expand

Pergunte à IA

ChatGPT

Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo

some-alt