DISTINCT

This lesson demonstrates how to remove duplicates from a result set using the DISTINCT clause.

We'll cover the following

DISTINCT CLAUSE

We’ll work with the DISTINCT clause in this lesson. This clause can be used to output unique rows in a result set. Remember DISTINCT is a post processing filter, meaning it is applied to the resulting rows of a query.

Example Syntax

SELECT DISTINCT col1

FROM table;

Connect to the terminal below by clicking in the widget. Once connected, the command line prompt will show up. Enter or copy and paste the command ./DataJek/Lessons/21lesson.sh and wait for the MySQL prompt to start-up.

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.