SQL SELECT DISTINCT Statement – SQL TUTORIAL | Software Testing Material

SQL Select Distinct:

SQL SELECT DISTINCT query is used to return only unique values. It eliminates all the duplicated values.

Syntax:

Example:

In the below image, you could find two SELECT queries.

Total number of records displayed in the result are 3 related to the first SELECT query whereas the total number of records displayed in the result are 2 related to the second SELECT query. We used a DISTINCT keyword in the second SELECT query, so all the duplicate values are eliminated and returned only the unique values.

SQL SELECT DISTINCT

In the next tutorial, we will see Union & Union All In SQL

Check out the complete SQL Tutorial by clicking on below link:

SQL Tutorial – Complete

Sharing is caring.

Share on facebook
Facebook
Share on twitter
Twitter
Share on linkedin
LinkedIn

Like This Post?

We have a lot more where that came from?

We only send really good stuff occasionally, promise.

Rajkumar

2 thoughts on “SQL SELECT DISTINCT Statement – SQL TUTORIAL | Software Testing Material”

  1. Finds a bug please refer attached Screenshot.

    • Thanks for pointing out Rahul. Will modify it.

Leave a Comment

API Testing eBook

DOWNLOAD FOR FREE